CentOS7 安装 nginx 官方 repo 源
添加nginx repo源
cat <<'EOF'> /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
EOF
yum 安装 nginx
yum install nginx -y
配置 nginx 开机自启
systemctl enable nginx
启动 nginx
systemctl start nginx
检查 nginx 运行状态
systemctl status nginx