Centos 7下安装nginx,使用yum install nginx,提示没有可用的软件包
Centos 7下安装nginx,使用yum install nginx,提示没有可用的软件包。
18 (flaskApi) [root@67 flaskDemo]# yum -y install nginx
19 已加载插件:fastestmirror, langpacks
20 Loading mirror speeds from cached hostfile
21 * base: mirrors.aliyun.com
22 * extras: mirrors.aliyun.com
23 * updates: mirrors.aliyun.com
24 没有可用软件包 nginx。
25 错误:无须任何处理
原因是nginx位于第三方的yum源里面,而不在centos官方yum源里面
很多软件包在yum里面没有的,解决的方法,就是使用epel源,也就是安装epel-release软件包。EPEL (Extra Packages for Enterprise Linux)是基于Fedora的一个项目,为“红帽系”的操作系统提供额外的软件包,适用于RHEL、CentOS等系统。可以在下面的网址上找到对应的系统版本,架构的软件包
解决办法,安装epel
sudo yum install epel-release
更新(更新时间稍微长一些,耐心等待)
yum update
重新试一下:
yum install -y nginx
安装成功:
已安装:
nginx.x86_64 1:1.12.2-3.el7 作为依赖被安装:
nginx-all-modules.noarch 1:1.12.2-3.el7
nginx-filesystem.noarch 1:1.12.2-3.el7
nginx-mod-http-geoip.x86_64 1:1.12.2-3.el7
nginx-mod-http-image-filter.x86_64 1:1.12.2-3.el7
nginx-mod-http-perl.x86_64 1:1.12.2-3.el7
nginx-mod-http-xslt-filter.x86_64 1:1.12.2-3.el7
nginx-mod-mail.x86_64 1:1.12.2-3.el7
nginx-mod-stream.x86_64 1:1.12.2-3.el7 完毕!
参考文档:
Centos 7下安装nginx,使用yum install nginx,提示没有可用的软件包的更多相关文章
- 解决centos 7.5安装openvpn,mirrors.163.com提示没有可用软件包openvpn、easy-rsa问题
提示: yum install openvpn 已加载插件:fastestmirror Loading mirror speeds from cached hostfile * base: mirro ...
- CentOS 7 下安装 LEMP 服务(nginx、MariaDB/MySQL 和 php)
原文 CentOS 7 下安装 LEMP 服务(nginx.MariaDB/MySQL 和 php) LEMP 组合包是一款日益流行的网站服务组合软件包,在许多生产环境中的核心网站服务上起着强有力的作 ...
- 在centos 7 下安装 nginx
在Linux下安装 nginx 1下载对应当前系统版本的nginx包(package) wget http://nginx.org/packages/centos/7/noarch/RPMS/ngi ...
- centos 7 下安装Nginx
下载Nginx wget nginx.tar.gz http://nginx.org/download/nginx-1.11.3.tar.gz 解压源码 .tar.gz 然后进入目录编译安装 cd n ...
- CentOS 6下安装nginx
原文:http://yubosun.akhtm.com/tech/centos-nginx.htm 1 在nginx官方网站下载一个rpm包,下载地址是:http://nginx.org/en/dow ...
- centos虚拟机下安装nginx
通过yum安装 yum install epel-release -y(企业级的镜像源) yum install nginx-y 启动.停止.重启 service nginx start servic ...
- centos6.5 64位 yum install nginx的默认安装路径
yum install nginx网站文件存放默认目录 /usr/share/nginx/html 网站默认站点配置 /etc/nginx/conf.d/default.conf 自定义Nginx站点 ...
- CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL)
CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL) 一.准备篇: /etc/init.d/iptables stop #关闭防火墙 关闭SELINUX vi /etc/sel ...
- yum install nginx
先安装nginx的yum源 http://nginx.org/en/linux_packages.html#stable 找到链接,安装: rpm -ivh http://nginx.org/pack ...
随机推荐
- 去掉img与img之间,video与video之间默认的间距(3种方式)
img,video{ /*第1种方式*/ border:; vertical-align: bottom; /*第2种方式*/ outline-width:0px; vertical-align:to ...
- @Transactional实现原理
Transactional是spring中定义的事务注解,在方法或类上加该注解开启事务.主要是通过反射获取bean的注解信息,利用AOP对编程式事务进行封装实现.AOP对事务的封装可以看我的这篇文章的 ...
- php手动实现ip2long和long2ip
php手动实现ip2long和long2ip /** * 测试 */ public function testipAction() { $ip = '10.58.101.175'; echo ip2l ...
- mac安装卸载brew
1.安装 访问https://brew.sh,copy图中的命令到命令行中,进行下载安装 2.卸载 官方版本的卸载: /usr/bin/ruby -e "$(curl -fsSL https ...
- jQuery实现动态时间
<!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="UTF-8& ...
- shell字符串拼接
name="Shell" url="http://c.biancheng.net/shell/" str1=$name$url #中间不能有空格 str2=&q ...
- 前端之JavaScript:JS之DOM对象一
js之DOM对象一 一.什么是HTML DOM HTML Document Object Model(文档对象模型) HTML DOM 定义了访问和操作HTML文档的标准方法 HTML DOM 把 ...
- Django【第28篇】:优化查询的方式
优化查询的方式 一.假设有三张表 Room id 1 2 .. 1000 User: id 1 .. 10000 Booking: user_id room_id time_id date 1 1 8 ...
- Django【第8篇】:Django之查询知识点总结
关于查询知识点总结 models.Book.objects.filter(**kwargs): querySet [obj1,obj2]models.Book.objects.filter(**kwa ...
- iOS各别版本new Date().getTime 获取时间戳为null问题
正常逻辑 new Date('2019-9-8').getTime() 注意日期格式 yyyy--mm-dd 因为yyyy/mm/dd也有兼容性问题 但是各别iOS版本不支持 // IOS 获取时间戳 ...