blank
blank
发布于 2019-03-13 / 493 阅读 / 0 评论 / 0 点赞

CentOS7 yum 安装官方 nginx

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

评论