【linxu笔记】redhat6.4 Server更换yum,便于安装软件

来源:互联网 发布:淘宝客关闭后多久生效 编辑:程序博客网 时间:2024/05/21 17:48


http://mirrors.163.com/centos/6/os/x86_64/Packages/

以上是网易的安装源,如果wget不成功(一般原因是版本不对),可以直接用浏览器打开然后下载下来。




【1】下载

http://www.bubuko.com/infodetail-1757909.html

【2】repo更换为163.并进行测试验证

http://blog.csdn.net/wangzhjj/article/details/53980727


[root@localhost yumSetup]# rpm -ivh python-libs-2.6.6-66.el6_8.i686.rpm python-2.6.6-66.el6_8.x86_64.rpm  --nodeps --forcewarning: python-libs-2.6.6-66.el6_8.i686.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEYPreparing...                ########################################### [100%]   1:python                 ########################################### [ 50%]   2:python-libs            ########################################### [100%][root@localhost yumSetup]# rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm --nodeps --forcewarning: python-urlgrabber-3.9.1-11.el6.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEYPreparing...                ########################################### [100%]   1:python-urlgrabber      ########################################### [100%][root@localhost yumSetup]# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm warning: python-iniparse-0.3.1-2.1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEYPreparing...                ########################################### [100%]package python-iniparse-0.3.1-2.1.el6.noarch is already installed[root@localhost yumSetup]# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm warning: yum-metadata-parser-1.1.2-16.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEYPreparing...                ########################################### [100%]   1:yum-metadata-parser    ########################################### [100%][root@localhost yumSetup]# 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: NOKEYPreparing...                ########################################### [100%]   1:yum-plugin-fastestmirro########################################### [ 50%]   2:yum                    ########################################### [100%][root@localhost yumSetup]# yum --version3.2.29  Installed: rpm-4.8.0-32.el6.x86_64 at 2017-11-24 13:54  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2012-11-15 14:22  Committed: Florian Festi <ffesti@redhat.com> at 2012-11-15  Installed: subscription-manager-1.1.23-1.el6.x86_64 at 2017-11-24 13:57  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2013-01-21 14:27  Committed: Adrian Likins <alikins@redhat.com> at 2013-01-21  Installed: yum-3.2.29-81.el6.centos.noarch at 2017-11-25 02:49  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2017-03-22 05:32  Committed: Johnny Hughes <johnny@centos.org> at 2017-03-21  Installed: yum-plugin-fastestmirror-1.1.30-40.el6.noarch at 2017-11-25 02:49  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2017-03-22 04:49  Committed: Valentina Mukhamedzhanova <vmukhame@redhat.com> at 2016-11-25[root@localhost yumSetup]# yum makecache fast已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.元数据缓存已建立[root@localhost yumSetup]# rpm -qa |grep subsc*subscription-manager-firstboot-1.1.23-1.el6.x86_64subscription-manager-1.1.23-1.el6.x86_64subscription-manager-gui-1.1.23-1.el6.x86_64[root@localhost yumSetup]# yum cleanall已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.No such command: cleanall. Please use /usr/bin/yum --help[root@localhost yumSetup]# yum make cache已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.No such command: make. Please use /usr/bin/yum --help[root@localhost yumSetup]# yummakecachebash: yummakecache: command not found[root@localhost yumSetup]# yum clean all已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Cleaning repos: 清理一切[root@localhost yumSetup]# lsCentOS7-Base-163.repo                     python-urlgrabber-3.9.1-11.el6.noarch.rpmpython-2.6.6-66.el6_8.x86_64.rpm          yum-3.2.29-81.el6.centos.noarch.rpmpython-iniparse-0.3.1-2.1.el6.noarch.rpm  yum-metadata-parser-1.1.2-16.el6.x86_64.rpmpython-libs-2.6.6-66.el6_8.i686.rpm       yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm[root@localhost yumSetup]# yum makecache已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.元数据缓存已建立[root@localhost yumSetup]# yum make cache已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.No such command: make. Please use /usr/bin/yum --help[root@localhost yumSetup]# yum clean all已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Cleaning repos: 清理一切[root@localhost yumSetup]# yum --version3.2.29  Installed: rpm-4.8.0-32.el6.x86_64 at 2017-11-24 13:54  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2012-11-15 14:22  Committed: Florian Festi <ffesti@redhat.com> at 2012-11-15  Installed: subscription-manager-1.1.23-1.el6.x86_64 at 2017-11-24 13:57  Built    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2013-01-21 14:27  Committed: Adrian Likins <alikins@redhat.com> at 2013-01-21  Installed: yum-3.2.29-81.el6.centos.noarch at 2017-11-25 02:49  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2017-03-22 05:32  Committed: Johnny Hughes <johnny@centos.org> at 2017-03-21  Installed: yum-plugin-fastestmirror-1.1.30-40.el6.noarch at 2017-11-25 02:49  Built    : CentOS BuildSystem <http://bugs.centos.org> at 2017-03-22 04:49  Committed: Valentina Mukhamedzhanova <vmukhame@redhat.com> at 2016-11-25[root@localhost yumSetup]# cd yum-yum-3.2.29-81.el6.centos.noarch.rpm                yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpmyum-metadata-parser-1.1.2-16.el6.x86_64.rpm        [root@localhost yumSetup]# cd yum-yum-3.2.29-81.el6.centos.noarch.rpm                yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpmyum-metadata-parser-1.1.2-16.el6.x86_64.rpm        [root@localhost yumSetup]# cd /etc/yum.repos.d/[root@localhost yum.repos.d]# lsrhel-source.repo[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo--2017-11-25 10:59:18--  http://mirrors.163.com/.help/CentOS6-Base-163.repo正在解析主机 mirrors.163.com... 123.58.190.228正在连接 mirrors.163.com|123.58.190.228|:80... 已连接。已发出 HTTP 请求,正在等待回应... 200 OK长度:2006 (2.0K) [application/octet-stream]正在保存至: “CentOS6-Base-163.repo”100%[===============================================================>] 2,006       --.-K/s   in 0s      2017-11-25 10:59:18 (237 MB/s) - 已保存 “CentOS6-Base-163.repo” [2006/2006])[root@localhost yum.repos.d]# lsCentOS6-Base-163.repo  rhel-source.repo[root@localhost yum.repos.d]# sed -i "s;\$releasever;6;g" CentOS6-Base-163.repo[root@localhost yum.repos.d]# lsCentOS6-Base-163.repo  rhel-source.repo[root@localhost yum.repos.d]# mv rhel-source.repo rhel-source.repo.bak[root@localhost yum.repos.d]# lsCentOS6-Base-163.repo  rhel-source.repo.bak[root@localhost yum.repos.d]# cat CentOS6-Base-163.repo # CentOS-Base.repo## The mirror system uses the connecting IP address of the client and the# update status of each mirror to pick mirrors that are updated to and# geographically close to the client.  You should use this for CentOS updates# unless you are manually picking other mirrors.## If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead.##[base]name=CentOS-6 - Base - 163.combaseurl=http://mirrors.163.com/centos/6/os/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=osgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#released updates [updates]name=CentOS-6 - Updates - 163.combaseurl=http://mirrors.163.com/centos/6/updates/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=updatesgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that may be useful[extras]name=CentOS-6 - Extras - 163.combaseurl=http://mirrors.163.com/centos/6/extras/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=extrasgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additional packages that extend functionality of existing packages[centosplus]name=CentOS-6 - Plus - 163.combaseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=centosplusgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#contrib - packages by Centos Users[contrib]name=CentOS-6 - Contrib - 163.combaseurl=http://mirrors.163.com/centos/6/contrib/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=contribgpgcheck=1enabled=0gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6[root@localhost yum.repos.d]# lsCentOS6-Base-163.repo  rhel-source.repo.bak[root@localhost yum.repos.d]# cat rhel-source.repo.bak [rhel-source]name=Red Hat Enterprise Linux $releasever - $basearch - Sourcebaseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[rhel-source-beta]name=Red Hat Enterprise Linux $releasever Beta - $basearch - Sourcebaseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[root@localhost yum.repos.d]# yum clean all已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Cleaning repos: base extras updates清理一切[root@localhost yum.repos.d]# yum makecache已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Determining fastest mirrorsbase                                                                              | 3.7 kB     00:00     base/group_gz                                                                     | 226 kB     00:00     base/filelists_db                                                                 | 6.4 MB     00:00     base/primary_db                                                                   | 4.7 MB     00:01     base/other_db                                                                     | 2.8 MB     00:00     extras                                                                            | 3.4 kB     00:00     extras/filelists_db                                                               |  25 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.2 MB     00:00     updates/prestodelta                                                               | 157 kB     00:00     updates/primary_db                                                                | 5.3 MB     00:00     updates/other_db                                                                  |  75 MB     00:06     元数据缓存已建立[root@localhost yum.repos.d]# yum seach vim已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.No such command: seach. Please use /usr/bin/yum --help[root@localhost yum.repos.d]# yum repolist已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Loading mirror speeds from cached hostfile仓库标识                                仓库名称                                                    状态base                                    CentOS-6 - Base - 163.com                                   6,706extras                                  CentOS-6 - Extras - 163.com                                    46updates                                 CentOS-6 - Updates - 163.com                                  809repolist: 7,561[root@localhost yum.repos.d]# yum -y install lrzsz已加载插件:fastestmirror, product-id, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.设置安装进程Loading mirror speeds from cached hostfile解决依赖关系--> 执行事务检查---> Package lrzsz.x86_64 0:0.12.20-27.1.el6 will be 安装--> 完成依赖关系计算依赖关系解决========================================================================================================= 软件包               架构                  版本                               仓库                 大小=========================================================================================================正在安装: lrzsz                x86_64                0.12.20-27.1.el6                   base                 71 k事务概要=========================================================================================================Install       1 Package(s)总下载量:71 kInstalled size: 159 k下载软件包:lrzsz-0.12.20-27.1.el6.x86_64.rpm                                                 |  71 kB     00:00     warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEYRetrieving key from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6Importing 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运行 rpm_check_debug 执行事务测试事务测试成功执行事务Warning: RPMDB altered outside of yum.** Found 52 pre-existing rpmdb problem(s), 'yum check' output follows:PackageKit-0.5.8-21.el6.x86_64 has missing requires of PackageKit-yum = ('0', '0.5.8', '21.el6')PackageKit-0.5.8-21.el6.x86_64 has missing requires of PackageKit-yum-plugin = ('0', '0.5.8', '21.el6')python-2.6.6-66.el6_8.x86_64 is a duplicate with python-2.6.6-36.el6.x86_64python-2.6.6-66.el6_8.x86_64 has missing requires of python-libs(x86-64) = ('0', '2.6.6', '66.el6_8')python-libs-2.6.6-66.el6_8.i686 is a duplicate with python-libs-2.6.6-36.el6.x86_64python-libs-2.6.6-66.el6_8.i686 has missing requires of libbz2.so.1python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6(GLIBC_2.0)python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6(GLIBC_2.1)python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6(GLIBC_2.1.2)python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6(GLIBC_2.1.3)python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6(GLIBC_2.2)python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6(GLIBC_2.3)python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6(GLIBC_2.3.2)python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6(GLIBC_2.3.4)python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6(GLIBC_2.4)python-libs-2.6.6-66.el6_8.i686 has missing requires of libc.so.6(GLIBC_2.7)python-libs-2.6.6-66.el6_8.i686 has missing requires of libcrypt.so.1python-libs-2.6.6-66.el6_8.i686 has missing requires of libcrypt.so.1(GLIBC_2.0)python-libs-2.6.6-66.el6_8.i686 has missing requires of libcrypto.so.10python-libs-2.6.6-66.el6_8.i686 has missing requires of libcrypto.so.10(libcrypto.so.10)python-libs-2.6.6-66.el6_8.i686 has missing requires of libdb-4.7.sopython-libs-2.6.6-66.el6_8.i686 has missing requires of libdl.so.2python-libs-2.6.6-66.el6_8.i686 has missing requires of libdl.so.2(GLIBC_2.0)python-libs-2.6.6-66.el6_8.i686 has missing requires of libdl.so.2(GLIBC_2.1)python-libs-2.6.6-66.el6_8.i686 has missing requires of libexpat.so.1python-libs-2.6.6-66.el6_8.i686 has missing requires of libexpat.so.1(EXPAT_2_0_1_RH)python-libs-2.6.6-66.el6_8.i686 has missing requires of libffi.so.5python-libs-2.6.6-66.el6_8.i686 has missing requires of libgdbm.so.2python-libs-2.6.6-66.el6_8.i686 has missing requires of libm.so.6python-libs-2.6.6-66.el6_8.i686 has missing requires of libm.so.6(GLIBC_2.0)python-libs-2.6.6-66.el6_8.i686 has missing requires of libm.so.6(GLIBC_2.1)python-libs-2.6.6-66.el6_8.i686 has missing requires of libncursesw.so.5python-libs-2.6.6-66.el6_8.i686 has missing requires of libnsl.so.1python-libs-2.6.6-66.el6_8.i686 has missing requires of libnsl.so.1(GLIBC_2.0)python-libs-2.6.6-66.el6_8.i686 has missing requires of libpanelw.so.5python-libs-2.6.6-66.el6_8.i686 has missing requires of libpthread.so.0python-libs-2.6.6-66.el6_8.i686 has missing requires of libpthread.so.0(GLIBC_2.0)python-libs-2.6.6-66.el6_8.i686 has missing requires of libpthread.so.0(GLIBC_2.1)python-libs-2.6.6-66.el6_8.i686 has missing requires of libpthread.so.0(GLIBC_2.1.1)python-libs-2.6.6-66.el6_8.i686 has missing requires of libpthread.so.0(GLIBC_2.2)python-libs-2.6.6-66.el6_8.i686 has missing requires of libreadline.so.6python-libs-2.6.6-66.el6_8.i686 has missing requires of libsqlite3.so.0python-libs-2.6.6-66.el6_8.i686 has missing requires of libssl.so.10python-libs-2.6.6-66.el6_8.i686 has missing requires of libssl.so.10(libssl.so.10)python-libs-2.6.6-66.el6_8.i686 has missing requires of libtinfo.so.5python-libs-2.6.6-66.el6_8.i686 has missing requires of libutil.so.1python-libs-2.6.6-66.el6_8.i686 has missing requires of libutil.so.1(GLIBC_2.0)python-libs-2.6.6-66.el6_8.i686 has missing requires of libz.so.1python-libs-2.6.6-66.el6_8.i686 has missing requires of libz.so.1(ZLIB_1.2.0)python-urlgrabber-3.9.1-11.el6.noarch is a duplicate with python-urlgrabber-3.9.1-8.el6.noarchrhn-check-1.0.0.1-4.el6.noarch has missing requires of yum-rhn-plugin >= ('0', '0.9.1', '35')  正在安装   : lrzsz-0.12.20-27.1.el6.x86_64                                                         1/1   Verifying  : lrzsz-0.12.20-27.1.el6.x86_64                                                         1/1 已安装:  lrzsz.x86_64 0:0.12.20-27.1.el6                                                                        完毕!















原创粉丝点击