nginx安装 cd /usr/local/src wget http://220.112.193.202/files/302100000569FBE9/nginx.org/download/nginx-1.12.2.tar.gz 解压到/usr/local/nginx ./configure --prefix=/usr/local/nginx make make install 编辑配置文件 vim /etc/init.d/nginx,内容使用https://coding.net/u/aminglinux/p/aminglinux-book/git/blob/master/D15Z/etc_init.d_nginx 修改启动文件权限,加入到chkconfig服务列表中
cd /usr/local/nginx/conf/; mv nginx.conf nginx.conf.bak vim nginx.conf //写入如下内容(参考https://coding.net/u/aminglinux/p/aminglinux-book/git/blob/master/D15Z/nginx.conf) /usr/local/nginx/sbin/nginx -t /etc/init.d/nginx start netstat -lntp |grep 80 测试:1.解析本地localhost没问题