标签:传输 etc 步骤 ble install www. 关闭 sbin rmi
1.获取nginx源码包
去到官网www.nginx.org下载:
可以将连接复制下来然后wget下载,这里虚拟机的网络应该设置为NAT模式,并且配置了网络yum源,
(因为后面的编译步骤需要用到几个devel包)
也可以先在本地下载源码包,然后再rz -y传输至虚拟机
2.编译安装nginx
mkdir -p /home/tools/
cd $_
wget http://nginx.org/download/nginx-1.14.0.tar.gz
tar -xf nginx-1.14.0.tar.gz
cd nginx-1.14.0
yum -y install pcre-devel zlib-devel
./configure --prefix=/usr/local/nginx
make && make install
cd /usr/local/nginx/
ls
cd sbin/
./nginx
3.测试
关闭防火墙和selinux
[root@localhost sbin]# getenforce
Enforcing
[root@localhost sbin]# setenforce 0
[root@localhost sbin]# getenforce
Permissive
iptables -F
或者/etc/init.d/iptables stop
本地用浏览器打开:
标签:传输 etc 步骤 ble install www. 关闭 sbin rmi
原文地址:https://www.cnblogs.com/hzdwwzz/p/9648216.html