RedHat Enterprise Linux 6.0(32位)如何使用CentOS YUM...

        因爲 redhat的yum在線更新是收費的,若是沒有註冊的話不能使用,若是要使用,需將redhat的yum卸載後,重啓安裝,再配置其餘源,如下爲詳細過程:  一、刪除redhat原有的yum  rpm -aq|grep yum|xargs rpm -e --nodeps 二、下載yum安裝文件 wget http://tel.mirrors.163.com/centos/6.4/os/i386/Packages/yum-3.2.29-40.el6.centos.noarch.rpm wget http://tel.mirrors.163.com/centos/6.4/os/i386/Packages/yum-metadata-parser-1.1.2-16.el6.i686.rpm wget http://tel.mirrors.163.com/centos/6.4/os/i386/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm wget http://tel.mirrors.163.com/centos/6.4/os/i386/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm 三、進行安裝yum rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm rpm -ivh yum-metadata-parser-1.1.2-16.el6.i686.rpm rpm -ivh yum-3.2.29-40.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm 注意最後兩個包必需同時安裝,不然會相互依賴. 四、更新repo文件 mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.repo.bak vi /etc/yum.repos.d/rhel-debuginfo.repo 內容爲: [base] name=CentOS-$releasever - Base baseurl=http://mirrors.163.com/centos/6.4/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates baseurl=http://mirrors.163.com/centos/6.4/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6 #packages used/produced in the build but not released #[addons] #name=CentOS-$releasever - Addons #baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/ #gpgcheck=1 #gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=http://mirrors.163.com/centos/6.4/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus baseurl=http://mirrors.163.com/centos/6.4/centosplus/$basearch/ gpgcheck=1 enabled=0 五、yum clean all 六、yum update 七、yum install vim #測試一下可不能夠用  【設置本地鏡像做爲yum源】 一、mkdir /mnt/cdrom 2 mount /dev/cdrom /mnt #掛着鏡像,光盤 3 vi /etc/yum.repos.d/rhel-debuginfo.repo #編輯repo文件 添加一下內容: [rhel_6_iso] name=local iso baseurl=file:///mnt gpgcheck=1 gpgkey=file:///mnt/RPM-GPG-KEY-redhat-release
相關文章
相關標籤/搜索