yum源搭建


yum源搭建


http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/yum-arch-2.2.2-1.el5.rf.noarch.rpm
http://down.51cto.com/data/412514       (centos-yumconf-4-4.5.noarch.rpm.tar.gz)


# rpm -ivh centos-yumconf-4-4.5.noarch.rpm

# rpm -ivh yum-2.4.3-4.el4.centos.noarch.rpm

# mount /dev/cdrom /media/cdrom

# rpm -ivh /media/cdrom/Server/yum-metadata-parser-1.1.2-3.el5.noarch.rpm

# vi /etc/yum.repos.d/CentOS-Base.repo

[base]
name=Red Hat Enterprise Linux $releasever -Base
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/5/os/$basearch/
gpgcheck=0   (原为1)
[update]
name=Red Hat Enterprise Linux $releasever -Updates
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/5/updates/$basearch/
gpgcheck=0
[extras]
name=Red Hat Enterprise Linux $releasever -Extras
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/5/extras/$basearch/
gpgcheck=0
[addons]
name=Red Hat Enterprise Linux $releasever -Addons
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$basearch&repo=os
baseurl=http://mirror.centos.org/centos/5/addons/$basearch/
gpgcheck=0

:wq

# yum clean all 清除缓存及旧的包

# yum install httpd 测试是否能安装软件

 

 

注:CentOS-Base.repo中的5为系统版本号,原为$releaseserver,要自己改下

 

 

你可能感兴趣的:(yum源搭建)