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
#将安装包移入
cd /usr/local/src tar -zxvf 安装包名称 ./configure make && make install
vim /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