20 / 07 / 17
CentOS7.x
创建文件nginx.repo
,将文件放置在 /etc/yum.repos.d
下
[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
sudo yum install nginx
nginx
nginx -v
nginx -s <信号>
信号可以是 stop:快速关机 quit:正常关机 reload:重新加载配置文件 reopen:重新打开日志文件
nginx -t