-
设置源
创建文件 /etc/yum.repos.d/nginx.repo ,内容为:
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/6/$basearch/ gpgcheck=0 enabled=1
-
安装
yum install nginx
-
查看Nginx,启动Nginx
service nginx status
nginx 或 service nginx start
-
重启Nginx
nginx -s reload
参考:
http://nginx.org/en/linux_packages.html
http://nginx.org/en/docs/beginners_guide.html
时间: 2024-10-18 13:37:34