gpt4 book ai didi

ubuntu - HHVM/Hiphop 的 Upstart 脚本

转载 作者:太空宇宙 更新时间:2023-11-03 16:59:53 24 4
gpt4 key购买 nike

我正在尝试在 Ubuntu 13.04 服务器上为 HHVM 又名 Hiphop PHP 设置新​​贵,因此它会在启动时启动并在意外终止时重新生成。

脚本在:

/etc/init/hhvm.conf

这是我目前所得到的:

# Upstart HHVM script
# This script will start/stop HHVM webserver

description "Start and stop the HHVM webserver (Hiphop-PHP)"
version "0.1"
author "RouteXL.com"

# Set the executable and the settings files
env RUN=/usr/share/hhvm/hiphop-php/hphp/hhvm/hhvm
env CONFIG=/etc/hhvm.hdf

# Run at startup when ready
start on (local-filesystems and net-device-up IFACE!=lo)

# Stop the webserver when server closes down
stop on runlevel [016]

# Respawn th webserver when unexpectedly stopped
respawn

# Expect the process to fork
expect fork
expect daemon

# The command to execute to start it up
exec $RUN -m server -c $CONFIG

当我输入时没有任何反应:

sudo start hhvm

怎么了?

最佳答案

Ubuntu 12.04。我在 sshd.conf 之后对此进行了建模,它似乎可以工作。我怀疑这是因为您正在使用 -m server 导致它永远不会从 exec 返回。使用 -m 守护进程。YMMV

# hhvm - HipHop VM
#
# The HipHopVM server provides a high performance PHP stack and web server.

description "HHVM server"
author "Yermo Lamers http://twitter.com/yermolamers"

start on filesystem or runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 10 5
umask 022

# Location of config and executable

env SERVER=/usr/local/bin/hhvm
env CONFIG_FILE=/usr/local/etc/hhvm.hdf
env RUN_AS=www-data

exec $SERVER -m daemon --config $CONFIG_FILE --user $RUN_AS

关于ubuntu - HHVM/Hiphop 的 Upstart 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19013516/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com