挂载本地源:
mount -o loop rhel-server-6.4-x86_64-dvd.iso /webapps/install/redhat/iso/
[root@webapp95 webapp95]#yum install gcc
[root@webapp95 webapp95]#yum install openssl*
[root@webapp95 webapp95]#yum install pcre*
[root@webapp95 webapp95]#yum install zlib*
[root@webapp95 webapp95]#yum install zlib-devle*
[root@webapp95 webapp95]#yum install zlib-de*
[root@webapp95 webapp95]#yum install sys*
[root@webapp95 webapp95]#yum install md*
[webapp@webapp95 webapp95 ~]tar -zxvf nginx-1.8.1.tar.gz
[root@webapp95 webapp95]#cd /webapps/nginx-1.8.1
[root@webapp95 webapp95]#./configure --prefix=/usr/local/nginx-1.8.1 --with-http_stub_status_module --with-http_ssl_module --with-pcre
[root@webapp95 webapp95]# make
[root@webapp95 webapp95]# make install
/usr/local/nginx-1.8.1/sbin/nginx#启动nginx
[root@webapp95 webapp95]#ps -ef|grep nginx
查看进程
/usr/local/nginx-1.8.1/sbin/nginx -t
/usr/local/nginx-1.8.1/sbin/nginx -s reload #重新加载配置文件
/usr/local/nginx-1.8.1/sbin/nginx -s stop #停止nginx