1. wget http://nginx.org/download/nginx-1.11.1.tar.gz

  2. tar xf nginx-1.11.1.tar.gz

  3. cd nginx-1.11.1

  4. 搭建yum环境,解决nginx需要的开发包

  5. 挂载光盘

  6. mount /dev/cdrom /mnt

  7. cd /etc/yum.repos.d/

  8. vim Centos_86x64.repo  

[base]

name=Centos_86x64

baseurl=file:///mnt/

enabled=1

gpgcheck=0

9. yum groupinstall "Server Platform Development" "Development tools"

10. yum install pcre-devel

13. cd nginx-1.11.1

14. ./configure --prefix=/usr/local/nginx --conf-path=/etc/nginx/nginx.conf

15. make && make install

16. cd /usr/local/nginx/sbin

17. ./nginx

18. 访问192.168.1.10

 nginx install_install