文档:
http://nginx.org/en/linux_packages.html
编辑yum仓库:
vi /etc/yum.repos.d/nginx.repo
粘贴:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
安装:
yum install -y nginx
配置文件路径:
/etc/nginx
查看配置文件有没有语法错误: nginx -t
启动:
systemctl start nginx
补充:
pkill 杀死一个进程,如 pkill nginx