Redhat linux 6.5 yum安裝

百聯達發表於2015-08-17
一:刪除已有的yum 

rpm -qa|grep yum
rpm -qa|grep yum|xargs rpm -e --nodeps
rpm -qa|grep yum


二:安裝新的yum

wget /> wget /> wget />



rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm  yum-3.2.29-60.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm


三:檔案配置

cd /etc/yum.repos.d/
wget   />
vim  CentOS6-Base-163.repo  檔案中的所有$release用6.6代替

[base]
name=CentOS-6.6 - Base - 163.com
baseurl= /> #mirrorlist= /> gpgcheck=1
gpgkey= />

#released updates
[updates]
name=CentOS-6.6 - Updates - 163.com
baseurl= /> #mirrorlist= /> gpgcheck=1
gpgkey= />

#additional packages that may be useful
[extras]
name=CentOS-6.6 - Extras - 163.com
baseurl= /> #mirrorlist= /> gpgcheck=1
gpgkey= />

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.6 - Plus - 163.com
baseurl= /> #mirrorlist= /> gpgcheck=1
enabled=0
gpgkey= />

#contrib - packages by Centos Users
[contrib]
name=CentOS-6.6 - Contrib - 163.com
baseurl= /> #mirrorlist= /> gpgcheck=1
enabled=0
gpgkey= />
四:使配置生效

yum clean all
yum makecache
yum update

五:防火牆配置

vi /etc/sysconfig/iptables
/etc/init.d/iptables restart


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28624388/viewspace-1773642/,如需轉載,請註明出處,否則將追究法律責任。

相關文章