标签:
参考文章
https://wiki.freebsdchina.org/faq/ports
http://www.vpsee.com/2014/04/install-nginx-php-apc-mysql-on-freebsd-10-0/
http://www.oschina.net/question/725072_155574
------------------------------------------------------------------------------------------------
1 - 设置 portsnap 安装更新 ports
2 - 安装php
3 - 安装nginx
------------------------------------------------------------------------------------------------
1 - 设置 portsnap 安装更新 ports
vi /etc/portsnap.conf
//设置:
SERVERNAME=portsnap.cn.freebsd.org
//你可以设置相对你速度快点的服务器的地址
portsnap fetch extract
//安装更新ports
2 - 安装php
cd /usr/ports/lang/php55
make install clean; rehash
cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
service php-fpm start
3 - 安装nginx
配置nginx.conf
vi /usr/local/etc/nginx/nginx.conf
对location ~ \.php$ 部分改动如下:
location ~ \.php$ { root /usr/local/www/nginx; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
重启nginx
nginx -s reload
标签:
原文地址:http://www.cnblogs.com/misstaste/p/4782855.html