nginx+php 安装手册
1: wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz
tar -zxvf
libiconv-1.13.1.tar.gz
cd
libiconv-1.13.1
./configure
--prefix=/usr/local/libiconv
make
make
install
2.获取安装文件: http://www.php.net/downloads.php
php-5.4.tar.gz(版本最新)
3 ./configure
--prefix=/usr/local/php --disable-fileinfo --enable-maintainer-zts --with-
iconv=/usr/local/share/doc/libiconv
--enable-fastcgi --enable-fpm --with-config-file-
path=/usr/local/php/etc
--enable-force-cgi-redirect
4 make make install
cp php-5.3.8/php.ini.dist /usr/local/php/lib/php.ini
(如果没有php.ini.dist 则把php.ini-development
php.ini-production中的任何一个重命名为
php.ini.dist即可。)
修改php.ini文件 register_globals = On
cp php-fpm.conf.default
php-fpm.conf
vim
php-fpm.conf
去掉下列变量前面的注释,以避免启动php-fpm时报错
pm.start_servers
= 20
pm.min_spare_servers =
5
pm.max_spare_servers =
35
pm.max_requests = 500
里面有个listen:9000默认
http://www.360doc.com/content/11/0719/12/5907545_134467868.shtml 【nginx安装】
nginx.conf配置
#keepalive_timeout
0;
keepalive_timeout
65;
fastcgi_connect_timeout
600;
fastcgi_send_timeout
600;
fastcgi_read_timeout
600;
fastcgi_buffer_size
512k;
fastcgi_buffers 32
512k;
fastcgi_busy_buffers_size
1024k;
fastcgi_temp_file_write_size
1024k;
location ~ \.php$ {
root
/usr/local/nginx/html;
fastcgi_pass
127.0.0.1:8088;
fastcgi_index
index.php;
fastcgi_param
SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
http://www.jb51.net/article/42716.htm
php-fpm重启
http://blog.csdn.net/stuartjing/article/details/6909319
nginx重启
报错
configure error xml2-config not found. please check your libxml2 installation
http://hi.baidu.com/weiokx/item/9039e4db3ccbc8ed785daac5
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。