您的位置:首页 > 运维架构 > Nginx

centos配置yum安装nginx

2017-11-02 16:04 357 查看
参考:
http://nginx.org/en/linux_packages.html http://www.cnblogs.com/hitwtx/archive/2012/02/13/2349742.html https://blog.csdn.net/lnboxue/article/details/74783885
首先,你需要知道你的centos发行版本: cat /etc/redhat-release

我的是6

用root权限在你的linux上执行: vi /etc/yum.repos.d/nginx.repo

写入

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=1

baseurl=http://nginx.org/packages/centos/6/$basearch/

centos是你的系统版本,red hat的话用rhel。

6 是发行版本,当前貌似只有6和7。

接下来,就可以执行 yum install nginx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: