rpm -qa|grep pcre* pcre-7.8-7.el6.x86_64 pcre-devel-7.8-7.el6.x86_64 如果缺少,可以用yum来安装,也是建议用yum方式安装。 yum install pcre pcre-devel -y rpm -qa|grep openssl* rpm -qa|grep openssl* openssh-5.3p1-122.el6.x86_64 openssh-clients-5.3p1-122.el6.x86_64 openssl-devel-1.0.1e-57.el6.x86_64 openssl-1.0.1e-57.el6.x86_64 openssh-server-5.3p1-122.el6.x86_64 yum install openssl openssl-devel -y yum install lsof -y useradd nginx -s /sbin/nologin -M scp /Users/vincent/Downloads/nginx-1.12.0.tar.gz root@10.199.199.89:/root/ tar xf nginx-1.12.0.tar.gz cd nginx-1.12.0 ./configure --user=nginx --group=nginx --prefix=/application/nginx --with-http_stub_status_module --with-http_ssl_module make make install ls -l /application/nginx/ ls -l /application/nginx/ 总用量 16 drwxr-xr-x. 2 root root 4096 5月 22 08:49 conf drwxr-xr-x. 2 root root 4096 5月 22 08:49 html drwxr-xr-x. 2 root root 4096 5月 22 08:50 logs drwxr-xr-x. 2 root root 4096 5月 22 08:49 sbin /application/nginx/sbin/nginx -t nginx: the configuration file /application/nginx/conf/nginx.conf syntax is ok nginx: configuration file /application/nginx/conf/nginx.conf test is successful 启动命令 /application/nginx/sbin/nginx lsof -i :80 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME nginx 4352 root 6u IPv4 16423 0t0 TCP *:http (LISTEN) nginx 4353 nginx 6u IPv4 16423 0t0 TCP *:http (LISTEN) netstat -lnt|grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN wget 127.0.0.1 curl 127.0.0.1 vim /etc/sysconfig/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT :wq! service iptables restart http://10.199.199.89 Welcome to nginx!