设为首页 收藏本站
查看: 935|回复: 0

[经验分享] Redhat6.6更改网易yum源 [图文版]

[复制链接]

尚未签到

发表于 2018-5-9 10:37:59 | 显示全部楼层 |阅读模式
  当前系统版本

[root@redhat-128 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)
  yum安装软件报错

[root@redhat-128 ~]# yum install -y net-snmp
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
No package net-snmp available.
Error: Nothing to do
  查询redhat6 yum相关依赖包

[root@redhat-128 ~]# rpm -qa | grep yum
yum-metadata-parser-1.1.2-16.el6.x86_64
yum-utils-1.1.30-30.el6.noarch
yum-rhn-plugin-0.9.1-50.el6.noarch
yum-plugin-security-1.1.30-30.el6.noarch
yum-3.2.29-60.el6.noarch
  卸载redhat6 yum相关依赖包
[root@redhat-128 ~]# rpm -qa | grep yum|xargs rpm -e --nodeps
[root@redhat-128 ~]# rpm -qa | grep yum
[root@redhat-128 ~]#
DSC0000.jpg
安装python-iniparse、yum-metadata-parser组件

[root@redhat-128 ~]# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
[root@redhat-128 ~]# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
DSC0001.jpg
python-2.6.6卸载并重新安装


[root@redhat-128 ~]# wget ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/6.5/x86_64/updates/security/python-2.6.6-64.el6.x86_64.rpm
[root@redhat-128 ~]# python -V
Python 2.6.6
[root@redhat-128 ~]# rpm -e python-2.6.6-52.el6.x86_64 --nodeps
[root@redhat-128 ~]# rpm -ivh  python-libs-2.6.6-66.el6_8.x86_64.rpm  python-2.6.6-64.el6.x86_64.rpm --nodeps  --force
warning: python-libs-2.6.6-66.el6_8.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
warning: python-2.6.6-64.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
Preparing...                ########################################### [100%]
1:python                 ########################################### [ 50%]
2:python-libs            ########################################### [100%]
  安装python-urlgrabber组件

[root@redhat-128 ~]# rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm --nodeps --force
warning: python-urlgrabber-3.9.1-11.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
1:python-urlgrabber      ########################################### [100%]
![](![](http://i2.51cto.com/images/blog/201801/16/446dcba9c917d31d85f7e57de1869207.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)http://i2.51cto.com/images/blog/201801/16/1fb20802454ea130b67cb3d6c38c6488.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
安装yum组件
[root@redhat-128 ~]# rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
warning: yum-3.2.29-81.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
1:yum-plugin-fastestmirro########################################### [ 50%]
2:yum                    ########################################### [100%]
DSC0002.jpg
更换网易centos6镜像,将$releaseserve替换为6
[root@redhat-128 ~]# wget -O /etc/yum.repos.d/CentOS6-Base-163.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
DSC0003.jpg
#清除原有缓存,重建缓存


[root@redhat-128 ~]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up Everything
Cleaning up list of fastest mirrors
[root@redhat-128 ~]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
base                                                                                                                                                    | 3.7 kB     00:00     
base/group_gz                                                                                                                                           | 226 kB     00:00     
base/filelists_db                                                                                                                                       | 6.4 MB     01:50     
base/primary_db                                                                                                                                         | 4.7 MB     00:11     
base/other_db                                                                                                                                           | 2.8 MB     00:09     
extras                                                                                                                                                  | 3.4 kB     00:00     
extras/filelists_db                                                                                                                                     |  26 kB     00:00     
extras/prestodelta                                                                                                                                      | 1.3 kB     00:00     
extras/primary_db                                                                                                                                       |  29 kB     00:00     
extras/other_db                                                                                                                                         |  30 kB     00:00     
updates                                                                                                                                                 | 3.4 kB     00:00     
updates/filelists_db                                                                                                                                    | 3.5 MB     00:04     
updates/prestodelta                                                                                                                                     | 171 kB     00:00     
updates/primary_db                                                                                                                                      | 5.8 MB     00:21     
updates/other_db                                                                                                                                        |  83 MB     04:42     
Metadata Cache Created
DSC0004.jpg
重新安装net-snmp


[root@redhat-128 ~]# yum install -y net-snmp
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package net-snmp.x86_64 1:5.5-60.el6 will be installed
--> Processing Dependency: net-snmp-libs = 1:5.5-60.el6 for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libsensors.so.4()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libnetsnmptrapd.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libnetsnmpmibs.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libnetsnmphelpers.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libnetsnmpagent.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Processing Dependency: libnetsnmp.so.20()(64bit) for package: 1:net-snmp-5.5-60.el6.x86_64
--> Running transaction check
---> Package lm_sensors-libs.x86_64 0:3.1.1-17.el6 will be installed
---> Package net-snmp-libs.x86_64 1:5.5-60.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================
Package                                        Arch                                  Version                                        Repository                           Size
===============================================================================================================================================================================
Installing:
net-snmp                                       x86_64                                1:5.5-60.el6                                   base                                309 k
Installing for dependencies:
lm_sensors-libs                                x86_64                                3.1.1-17.el6                                   base                                 38 k
net-snmp-libs                                  x86_64                                1:5.5-60.el6                                   base                                1.5 M
Transaction Summary
===============================================================================================================================================================================
Install       3 Package(s)
Total download size: 1.9 M
Installed size: 6.3 M
Downloading Packages:
(1/3): lm_sensors-libs-3.1.1-17.el6.x86_64.rpm                                                                                                          |  38 kB     00:00     
(2/3): net-snmp-5.5-60.el6.x86_64.rpm                                                                                                                   | 309 kB     00:00     
(3/3): net-snmp-libs-5.5-60.el6.x86_64.rpm                                                                                                              | 1.5 MB     00:02     
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                          134 kB/s | 1.9 MB     00:14     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid: "CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>"
From  : http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 4 pre-existing rpmdb problem(s), 'yum check' output follows:
python-2.6.6-64.el6.x86_64 has missing requires of python-libs(x86-64) = ('0', '2.6.6', '64.el6')
python-libs-2.6.6-66.el6_8.x86_64 is a duplicate with python-libs-2.6.6-52.el6.x86_64
python-urlgrabber-3.9.1-11.el6.noarch is a duplicate with python-urlgrabber-3.9.1-9.el6.noarch
rhn-check-1.0.0.1-18.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')
Installing : lm_sensors-libs-3.1.1-17.el6.x86_64                                                                                                                         1/3
Installing : 1:net-snmp-libs-5.5-60.el6.x86_64                                                                                                                           2/3
Installing : 1:net-snmp-5.5-60.el6.x86_64                                                                                                                                3/3
Verifying  : lm_sensors-libs-3.1.1-17.el6.x86_64                                                                                                                         1/3
Verifying  : 1:net-snmp-libs-5.5-60.el6.x86_64                                                                                                                           2/3
Verifying  : 1:net-snmp-5.5-60.el6.x86_64                                                                                                                                3/3
Installed:
net-snmp.x86_64 1:5.5-60.el6                                                                                                                                                
Dependency Installed:
lm_sensors-libs.x86_64 0:3.1.1-17.el6                                                    net-snmp-libs.x86_64 1:5.5-60.el6                                                   
Complete!
DSC0005.jpg
备注:上述所安装rpm包都可在下面链接搜索下载的到。
mirrors.163.com/centos/6/os/x86_64/Packages/

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-457560-1-1.html 上篇帖子: HP C7000刀片服务器实战3:Redhat Linux 6.8操作系统安装 下篇帖子: Redhat编译nginx
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表