centos 下安装nginx
安装make:
yum -y install gcc automake autoconf libtool make
安装g++:
yum install gcc gcc-c++
cd /usr/local/src
安装pcre
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz
tar -zxvf pcre-8.37.tar.gz
cd pcre-8.34
./configure
make
make install
安装 pcre-devel
yum install pcre-devel
官网下载 http://nginx.org/en/download.html 源码
将安装包移入 /usr/local/src 文件夹
tar -zxvf 安装包
./configure
make && make install
修改 /usr/local/nginx/conf/nginx.conf
将上面的修改为
#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
// 启动nginx
/usr/local/nginx/sbin/nginx
// 重启nginx
/usr/local/nginx/sbin/nginx -s reload