yum源的相关事项

时间:2022-12-21 07:25:42

有时候需要某些个别的包,不想使用yum的关联更新的时候,找到rpm包是个问题,但是163可以提供:

http://mirrors.163.com/centos

1.先看看centos版本:cat /etc/redhat-release

2.找到对应的路径如:http://mirrors.163.com/centos/6.5/os/x86_64/Packages/ftp-0.17-54.el6.x86_64.rpm

3.使用rpm安装:rpm -Uvh http://mirrors.163.com/centos/6.5/os/x86_64/Packages/ftp-0.17-54.el6.x86_64.rpm

 

如果想修改默认的yum源:

cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS-Base-163.repo
mv CentOS-Base.repo CentOS-Base.repo.bak
mv CentOS-Base-163.repo CentOS-Base.repo

然后运行yum makecache生成缓存。
     

    yum clean all
yum makecache