red hat 5.4 nginx 支持 php5.3.10
支持 PHP#wget http://cn2.php.net/get/php-5.3.10.tar.bz2/from/cn.php.net/mirror
#tar xvf php-5.3.10.tar.bz2
#cd php-5.3.10
#./configure --prefix=/usr/local/php5 --enable-mbstring --enable-fpm --with-jpeg-dir --with-png-dir --with-gd --with-freetype-dir --with-gd 注 gd 请使用 yum 安装
#make && make install
#cp php.ini-development /usr/local/php5/lib/php.ini
#vi /usr/local/php5/lib/php.ini
修改 date.timezone = PRC 去掉前面的 ;
#cd /usr/local/nginx/conf
#cp php-fpm.conf.default php-fpm.conf
#vi php-fpm.conf
修改以下地方 去掉前面的 #
fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name;
/usr/local/nginx/html/ 这里写解析 php 的路径
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html/$fastcgi_script_name;
include fastcgi_params;
}
常用命令
#netstat -tulnp 查看有没有 9000
#netstat -antp |grep :9000 这个命令也可以
#pkill -9 nginx
#ps -aux | grep php
- 上一篇:red hat 5.4 安装 nginx
- 下一篇:安装 vsftp