注:如果使用非root权限,请在命令前面加上 sudo;
# 更新并升级
apt-get update && apt-get upgrade
# 安装 Nginx
apt-get install nginx -y
# 安装 Mysql
apt-get install mysql-server-5.6 -y
# 安装 HHVM
apt-get install hhvm -y
# 安装 PhpMyAdmin
apt-get install phpmyadmin -y
# 安装 进程守护
apt-get install ps-watcher -y
# 安装 FastCGI 配置脚本
/usr/share/hhvm/install_fastcgi.sh
# 自动配置 phpmyadmin
/usr/sbin/pma-configure .
/usr/sbin/pma-secure
# 通过:域名/phpmyadmin 访问
ln -s /usr/share/phpmyadmin /usr/share/nginx/html
# 将 hhvm 加入开机启动
update-rc.d hhvm defaults
# 编辑加入或替换 hhvm.conf
nano /etc/nginx/hhvm.conf
location ~ .(hh|php)$ {
fastcgi_keep_conn on;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/hhvm/sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# 编辑加入或替换 php.ini
nano /etc/hhvm/php.ini
; php options
session.save_handler = files
session.save_path = /var/lib/php5
session.gc_maxlifetime = 1440
; hhvm specific
hhvm.log.level = Warning
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.mysql.typed_results = false
hhvm.enable_zend_compat = true
max_execution_time = 300
max_input_time = 60
post_max_size = 10M
upload_max_filesize = 10M
memory_limit = 512M
expose_php = 0
# 编辑加入或替换 server.ini
nano /etc/hhvm/server.ini
; php options
pid = /var/run/hhvm/pid
; hhvm specific
; hhvm.server.port = 9000
hhvm.server.file_socket = /var/run/hhvm/sock
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.log.use_log_file = true
hhvm.log.file = /var/log/hhvm/error.log
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
# 编辑加入或替换 ps-watcher.conf
nano /etc/ps-watcher.conf
[hhvm]
occurs = none
action = service hhvm restart
# 启用 ps-watcher
sed -i -e 's/# startup=1/startup=1/g' /etc/default/ps-watcher
# 编辑加入或替换 hhvm
nano /etc/init.d/hhvm
RUN_AS_USER="www"
RUN_AS_GROUP="www"
# 编辑加入或替换 nginx.conf
nano /etc/nginx/nginx.conf
user www www;
worker_processes auto;
# 增加 www 用户和用户组
groupadd www;
useradd -m -s /sbin/nologin -g www www;
# 更改所有者为 www
chown -R www.www /var/log/nginx
chown -R www.www /var/run/hhvm
chown -R www.www /var/log/hhvm
chown -R www.www /var/lib/phpmyadmin
chown -R www.www /usr/share/phpmyadmin
chown -R www.www /etc/phpmyadmin/
# 删除用户
userdel -r nginx
userdel -r www-data
# 启动
service nginx restart
service mysql restart
service hhvm restart
service ps-watcher restart
茶杯头甜蜜终章dlc 官方手机版v1.0.0.3
下载火柴人传说暗影格斗内置菜单 最新版v3.0.1
下载荒野乱斗测试服 安卓版v61.10.3
下载荒野乱斗彩虹服 安卓版v61.10.3
下载寒霜启示录 安卓版v1.25.10
寒霜启示录是一款生存模拟游戏,不少玩家可能对于末日都有着自己
末日城堡免广告版 安卓最新版v0.7.1
末日城堡免广告版是一款非常好玩的模拟经营类游戏,内部可以不看
甜蜜人生模拟器 最新版v1.4.5
甜蜜人生模拟器是一款非常好玩的模拟恋爱手游,玩家在这里能够对
武器锻造师内置功能菜单 v10.4
武器锻造师内置菜单版是游戏的破解版本,在该版本中为玩家提供了
开放空间overfield 安卓版v1.0.5
开放空间Overfield是一款箱庭养成经营手游,让你在广阔