CentOS安装Nginx
2016-03-14 23:15
483 查看
利用yum 命令, 可以简化Nginx的安装
本来可以一句:
yum install nginx --installroot=/usr/local/nginx
很遗憾报错了
看了官方, 是这么说的
To set up the yum repository for RHEL/CentOS, create the file named
Replace “
本来可以一句:
yum install nginx --installroot=/usr/local/nginx
很遗憾报错了
YumRepo Error: All mirror URLs are not using ftp, http[s] or file. Eg. $releasever is not a valid and current release or hasnt been released yet/ removing mirrorlist with no valid mirrors: /usr/local/nginx/var/cache/yum/x86_64/$releasever/base/mirrorlist.txt 错误: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.repowith 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
相关文章推荐
- nginx 解决400 bad request 的方法
- mac安装nginx步骤
- Linux下安装Nginx详细图解教程
- nginx的zabbix自定义监控
- 在 CentOS/Linux 把 Kibana 3.0 部署在 Nginx 1.9.12
- Nginx 502错误触发条件与解决办法汇总
- nginx的access-log中添加cookie
- nginx配置
- nginx 反代+负载均衡
- Nginx中文域名配置
- lvs、haproxy、nginx 负载均衡的比较分析
- 欢迎使用CSDN-markdown编辑器
- 为Nginx 创建 Windows 的服务程序
- nginx.conf配置文件详解
- centos 7上nginx+uwsgi 性能调优
- 在windows下将Nginx添加为系统服务
- Nginx服务器出现413 request entity too large nginx的处理方法
- Mac下配置Nginx服务器
- Nginx日志文件切割
- Nginx配置文件nginx.conf中文详解(总结)