1.下載pcre
#wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.33/pcre-8.33.tar.gz
2.安裝pcre-8.33.tar.gz
Java代碼 收藏代碼
#tar zxvf pcre-8.33.tar.gz
#cd pcre-8.33/
#yum install -y gcc gcc-c++nginx
ps:沒法yum安裝,http://www.javashuo.com/article/p-wwxmjpke-gr.htmlc++
#./configure
#make && make install .net
3.下載nginx
#wget http://nginx.org/download/nginx-1.5.3.tar.gz
4.解壓
Java代碼 收藏代碼
#tar -zxvf nginx-1.5.3.tar.gz
#cd nginx-1.5.3
4.5.少包
yum install -y zlib-develblog
ps:沒法yum安裝,進程
1、將zlib文件夾內文件放入下面目錄中
/usr/local/src/zlibip
二/執行
# rpm -ivh zlib-devel-1.2.3-29.el6.x86_64.rpmget
-------------------------------------------------------------------------------------------------------------it
#./configure --prefix=/usr/local/nginx-1.5.3 --conf-path=/usr/local/nginx-1.5.3/nginx.conf --with-pcre=/usr/local/pcre-8.33 --with-http_stub_status_module --with-http_realip_module
#make
#make install module
5.啓動nginxgcc
/usr/local/nginx-1.5.3/sbin/nginx -c /usr/local/nginx-1.5.3/conf/nginx.conf (包括sbin的目錄) (包括ngnix下的配置文件的目錄) 6.平滑啓動 平滑重啓命令: kill -HUP 住進稱號或進程號文件路徑