freebsd上安装nginx+php记录

参考文章 

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

nginx配置:http://www.cnblogs.com/kuyuecs/archive/2012/07/12/2588025.html

nginx优化参数 http://it.chinawin.net/internet/article-e17.html

 

------------------------------------------------------------------------------------------------

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

 

 

---------------------------------------------

php - apc 介绍 http://www.cnblogs.com/scotoma/archive/2010/08/17/1801391.html

 

你可能感兴趣的:(freebsd上安装nginx+php记录)