在centos 7上安装nginx,使用命令yum install nginx -y,报错如下:
[root@tomcat data]# yum install nginx -y 已加载插件:fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.aliyun.com * updates: mirrors.163.com base | 3.6 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 没有可用软件包 nginx。 错误:无须任何处理
解决办法:
(1)先安装epel源
yum install epel-release -y
(2)更新(这个操作可能耗时有点长)
yum update
(3)再次执行安装
yum install nginx -y