系统是centos6.5执行
yum install php php-fpm php-bcmatch php-gd php-mbstring php-mcrypt php-mysql –y
yum install -y php-*
yum install -y curl curl-devel net-snmp net-snmp-devel perl-DBI
vim /etc/php.ini
date.timezone = Asia/Shanghai
post_max_size = 16M
max_execution_time =
300
max_input_time =
300
使用套接字方式
vim /etc/php-fpm.d/www.conf
;listen =
127.0
.
0.1
:
9000
listen = /dev/shm/php-cgi.sock
重启fpm
/etc/init.d/php-fpm restart
nginx配置文件修改套接字
location ~ \.php$ {
root /data/sns/home;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
nginx配置文件参考:
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。