在centos7上安装nginx

创建文件:/etc/yum.repos.d/nginx.repo

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

激活nginx安装源

yum-config-manager --enable nginx-mainline

安装nginx

yum install nginx

启动nginx服务并加入开机启动

systemctl start nginx
systemctl enable nginx

 

上一篇:一、十六进制——大数据Amabri集群部署文档


下一篇:构建chinaskillmall-nginx镜像