栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

yum安装nginx失败显示没有可用安装包或者安装显示 您可以尝试添加 --skip-broken 选项来解决该问题 您可以尝试执行:rpm -Va --nofiles --nodigest

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

yum安装nginx失败显示没有可用安装包或者安装显示 您可以尝试添加 --skip-broken 选项来解决该问题 您可以尝试执行:rpm -Va --nofiles --nodigest

1.因为yum源中没有Nginx,需要新增加一个yum源,创建一个nginx.repode 文件

[root@localhost ~]# vim /etc/yum.repos.d/nginx.repo

2.把下面的复制到文件中保存

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

3.查询配置yum源

[root@localhost ~]# yum list |grep nginx
 

4.显示这样则配置成功

collectd-nginx.x86_64                     4.10.9-5.el6                 epel     
munin-nginx.noarch                        2.0.63-1.el6                 epel     
nginx.x86_64                              1:1.20.2-1.el7.ngx           nginx    
nginx-all-modules.noarch                  1.10.3-1.el6                 epel     
nginx-debug.x86_64                        1:1.8.0-1.el7.ngx            nginx    
nginx-debuginfo.x86_64                    1:1.20.2-1.el7.ngx           nginx    
nginx-filesystem.noarch                   1.10.3-1.el6                 epel     
nginx-mod-http-geoip.x86_64               1.10.3-1.el6                 epel     
nginx-mod-http-image-filter.x86_64        1.10.3-1.el6                 epel     
nginx-mod-http-perl.x86_64                1.10.3-1.el6                 epel     
nginx-mod-http-xslt-filter.x86_64         1.10.3-1.el6                 epel     
nginx-mod-mail.x86_64                     1.10.3-1.el6                 epel     
nginx-mod-stream.x86_64                   1.10.3-1.el6                 epel     
nginx-module-geoip.x86_64                 1:1.20.2-1.el7.ngx           nginx    
nginx-module-geoip-debuginfo.x86_64       1:1.20.2-1.el7.ngx           nginx    
nginx-module-image-filter.x86_64          1:1.20.2-1.el7.ngx           nginx    
nginx-module-image-filter-debuginfo.x86_64
                                          1:1.20.2-1.el7.ngx           nginx    
nginx-module-njs.x86_64                   1:1.20.2+0.7.2-1.el7.ngx     ngin

..........

5.执行命令显示这样,就可以直接下载nginx

[root@localhost ~]# yum  install nginx

开启nginx

[root@localhost ~]# systemctl start nginx
查询nginx状态
[root@localhost ~]# systemctl status nginx
● nginx.service - nginx - high performance web server
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: active (running) since 二 2022-02-08 16:27:08 CST; 10s ago
 


 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/731188.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号