ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Redhat linux 6.5 yum安装

Redhat linux 6.5 yum安装

原创 Linux操作系统 作者:百联达 时间:2015-08-17 08:32:58 0 删除 编辑
一:删除已有的yum 

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


二:安装新的yum

wget http://mirrors.163.com/centos/6.6/os/x86_64/Packages/yum-3.2.29-60.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6.6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6.6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm




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  http://mirrors.163.com/.help/CentOS6-Base-163.repo

vim  CentOS6-Base-163.repo  文件中的所有$release用6.6代替

[base]
name=CentOS-6.6 - Base - 163.com
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.6&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


#released updates
[updates]
name=CentOS-6.6 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/6.6/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.6&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


#additional packages that may be useful
[extras]
name=CentOS-6.6 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/6.6/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.6&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.6 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/6.6/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.6&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6


#contrib - packages by Centos Users
[contrib]
name=CentOS-6.6 - Contrib - 163.com
baseurl=http://mirrors.163.com/centos/6.6/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=6.6&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

四:使配置生效

yum clean all
yum makecache
yum update

五:防火墙配置

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


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28624388/viewspace-1773642/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
10年以上互联网经验,先后从事过制造业,证券业,物业行业和物流行业信息系统和互联网产品的研发,6年系统架构经验。最近关注Kubernetes微服务架构和Istio微服务治理框架。

注册时间:2013-02-05

  • 博文量
    317
  • 访问量
    1017757