mac 安装和配置 hhvm和nginx 总结
来源:互联网 发布:mac用什么播放器 编辑:程序博客网 时间:2024/06/05 07:17
配置文件和文档见 https://github.com/robertzhai/php/tree/master/hhvm
1. 前端nginx讲请求转发给后端的以fastcgi模式运行的hhvm
2.hhvm install
brew tap hhvm
brew install hhvm
安装好后
$ hhvm --version
HipHop VM 3.14.3 (rel)
Compiler: 1470972790_N
Repo schema: 51c9cd8b577ded55390868fb9916ee95eb6175d8
3.nginx.conf
server {
listen 8098;
server_name localhost;
root /wwwroot;
index index.php index.html index.htm main.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:8099;
#fastcgi_pass unix:/usr/local/etc/hhvm/hhvm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
4.hhvm.hdf
ResourceLimit {
CoreFileSize = 50000000000 # 设置core文件大小防止出core把磁盘写爆,in bytes, 设成0会导致不出core
MaxSocket = 5000 # 最大句柄数,设为0会出core
SocketDefaultTimeout = 5 # in seconds
MaxRSS = 4000000000 # 最大占用的物理内存,如果超过,则进程退出
MaxRSSPollingCycle = 60 # 检查内存占用的时间间隔
DropCacheCycle = 0 # in seconds, how often to drop disk cache
}
Server {
# 域名IP端口
#Host = www.domain.com
#IP = 0.0.0.0
Type = fastcgi
Port = 8099
#FileSocket = /usr/local/etc/hhvm/hhvm.sock
}
Log {
Level = Info
AlwaysLogUnhandledExceptions = true
RuntimeErrorReportingLevel = 8191
UseLogFile = true
UseSyslog = false
File = /usr/local/etc/hhvm/error.log
Access {
* {
File = /usr/local/etc/hhvm/access.log
Format = %h %l %u % t \"%r\" %>s %b
}
}
}
5.启动hhvm daemon进程
hhvm --mode daemon --config ./hhvm.hdf
6.访问
http://localhost:8098/index.php
HHVM Version 3.14.3
Version
Version3.14.3Version ID31403Debug Compiler ID1470972790_NRepo Schema51c9cd8b577ded55390868fb9916ee95eb6175d8PHP Version5.6.99-hhvmZend Version2.4.99unameDarwin xxxMacBook-Pro-3.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; xxx:xnu-2782.30.5~1/RELEASE_X86_64 x86_647.其它系统安装和配置请参考
https://www.deamwork.com/archives/toss-hhvmnginxfastcgi.orz6
- mac 安装和配置 hhvm和nginx 总结
- MAC环境下安装和配置Nginx
- Mac下nginx安装和配置
- mac+nginx+redis+php+composer的安装和配置
- Debian Wheezy 安装Nginx+HHVM
- nginx安装和配置
- 安装和配置nginx
- nginx安装和配置
- 安装和配置nginx
- nginx安装和配置
- Nginx 安装和配置
- Nginx安装和配置
- Mac下配置nginx和php环境
- centos6 配置hhvm+php+Nginx+mysql
- centos6 配置hhvm+php+Nginx+mysql
- php-fpm VS hhvm && nginx 配置
- mac下安装nginx和php
- mac下安装nginx和php
- 勾股定理一日一证连载97
- Theano 初探(二)随机数与梯度下降logistic模型
- 牛人博客
- Docker reference
- 物联网安全
- mac 安装和配置 hhvm和nginx 总结
- 计算机网络(四)--传输层
- java反射机制(Reflection)
- [原创]mac下安装Android开发环境
- Linux/Unix下为特定的操作系统进程指定专用的cpu
- 今天开始对web三大框架的学习
- IDEA TODO
- Yii2 深入了解模型之增删改查
- ssd(固态盘)的几种接口