首页 > 其他 > 详细

CentOS安装Nginx

时间:2016-03-15 00:33:34      阅读:196      评论:0      收藏:0      [点我收藏+]

利用yum 命令, 可以简化Nginx的安装

本来可以一句:

yum install nginx --installroot=/usr/local/nginx 

很遗憾报错了

1 YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
2  Eg. $releasever is not a valid and current release or hasnt been released yet/
3 removing mirrorlist with no valid mirrors: /usr/local/nginx/var/cache/yum/x86_64/$releasever/base/mirrorlist.txt
4 错误:Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again

看了官方, 是这么说的

To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with the following contents:

Replace “OS” with “rhel” or “centos”, depending on the distribution used, and “OSRELEASE” with “5”, “6”, or “7”, for 5.x, 6.x, or 7.x versions, respectively.

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/OS/OSRELEASE/$basearch/
gpgcheck=0
enabled=1 

CentOS安装Nginx

原文:http://www.cnblogs.com/vivid-stanley/p/5277661.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!