歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

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

RedHat Enterprise Linux 6.0(32位)如何使用CentOS YUM...           由於 redhat的yum在線更新是收費的,如果沒有注冊的話不能使用,如果要使用,需將redhat的yum卸載後,重啟安裝,再配置其他源,以下為詳細過程:   1、刪除redhat原有的yum     rpm -aq|grep yum|xargs rpm -e --nodeps    2、下載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    3、進行安裝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    注意最後兩個包必需同時安裝,否則會相互依賴.      4、更新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    5、yum clean all  6、yum update  7、yum install vim #測試一下可不可以用       【設置本地鏡像作為yum源】    1、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   
Copyright © Linux教程網 All Rights Reserved