==============================================
1、安装pcre、pcre-devel、openssl、openssl-devel
----------------------------------------------------
# rpm -qa pcre、pcre-devel、openssl、openssl-devel
# yum install pcre pcre-devel openssl openssl-devel -y
----------------------------------------------------
2、添加用户nginx
# useradd -s /sbin/nologin -M nginx
-----------------------------------------------------
3、正式安装nginx
---------------------------------------------
# mkdir /server/tools -p
# cd /server/tools/
# wget http://nginx.org/download/nginx-1.6.3.tar.gz 下载安装
# tar -zxvf nginx-1.6.3.tar.gz
# cd nginx-1.6.3
# ./configure --prefix=/usr/local/nginx-1.6.3 --user=nginx --# group=nginx --with-http_ssl_module --with-http_stub_status_module
# make && make install
# ln -s /usr/local/nginx-1.6.3/ /usr/local/nginx
# /usr/local/nginx/sbin/nginx
# /etc/init.d/iptables stop
# chkconfig iptables off
=========================================
4、测试安装:
-------------------------------------
# curl 127.0.0.1
# wget 127.0.0.1
# window浏览器输入:192.168.0.20
---------------------------------------
5、排错
------------------------------------------
1)ping 192.168.0.20 物理不通
2)telnet 192.168.0.20 80 浏览器到web服务不通
3)服务器本地curl 192.168.0.20 WEB服务开没开