一、nginx的yum安装
1.下载nginx的rpm包:
wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
2.安装rpm包
rpm -ivh nginx-release-centos-7-0.el7.ngx.noarch.rpm
3.安装nginx
yum -y install nginx
4.启动nginx服务并设置开机自启
systemctl start nginx
systemctl enable nginx