- wget http://nginx.org/download/nginx-1.11.1.tar.gz
- tar xf nginx-1.11.1.tar.gz
- cd nginx-1.11.1
- 搭建yum环境,解决nginx需要的开发包
- 挂载光盘
- mount /dev/cdrom /mnt
- cd /etc/yum.repos.d/
- 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
时间: 2024-12-11 21:10:33