NGINX-安装-PCRE安装

1.环境:
XXX.XXX.XXX.XXX    devwqs2/XXXXXXXXX
2.查看是否安装GCC和G++
[devwqs2@cslab-svr01 ~]$ which g++
/usr/bin/g++
[devwqs2@cslab-svr01 ~]$ which gcc
/usr/bin/gcc
[devwqs2@cslab-svr01 ~]$ 
G++和GCC是安装PCRE不可缺少的.
3.安装PCRE
路径
[devwqs2@cslab-svr01 pcre-8.10]$ pwd
/home/devwqs2/soft/pcre-8.10
[devwqs2@cslab-svr01 pcre-8.10]$ ls 
执行安装命令
ksh configure (参数选择默认即可,有的环境中用./configure)
make
make install
PCRE对NGINX很多支持,有必要安装.
4.安装NGINX
路径
[devwqs2@cslab-svr01 nginx-0.8.53]$ pwd
/home/devwqs2/soft/nginx-0.8.53
[devwqs2@cslab-svr01 nginx-0.8.53]$ 
执行安装命令
ksh configure --prefix=/home/devwqs2/nginx --with-http_ssl_module
(有的环境用./configure --prefix=/home/devwqs2/nginx --with-http_ssl_module )
make
make install
5.NGINX的启动相关
语法检测
/home/devwqs2/nginx/sbin/nginx -t -c /home/devwqs2/nginx/conf/nginx.conf
启动
/home/devwqs2/nginx/sbin/nginx  -c  /home/devwqs2/nginx/conf/nginx.conf
平滑启动
/home/devwqs2/nginx/sbin/nginx  -s  reload
查看进程情况
ps -ef|grep nginx
结束NGINX所有进程
pkill -9 nginx
资源: http://wiki.nginx.org/Chs

你可能感兴趣的:(Apache/Nginx)