資源描述:
《redhat使用centosyum源更新軟件包的配置方法》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫。
1、RedHat6使用CentOSYUM源更新的方法 由于Redhat的yum在線更新是收費的,如果沒有注冊賬號則不能使用,即不能在線安裝軟件。所以,無注冊號的Redhat系統(tǒng),想用yum源來在線安裝軟件,就必須重新安裝centos的yum包,并配置yum鏡像源?! 【唧w步驟如下:1、刪除redhat原有的yum源#rpm-aq
2、grepyum
3、xargsrpm-e--nodeps2、下載新的yum安裝包?下載CentOS的yum安裝包,可從官方網(wǎng)站查找下載(http://mirror.centos.org/centos/6/os/x86_64/Pack
4、ages/),找到相關(guān)包名即可,后面的版本號有可能不同。注:域名如果不能訪問,添加DNS服務(wù)器:vi/etc/resolv.confnameserver221.131.143.69python-iniparse-0.3.1-2.1.el6.noarch.rpmyum-metadata-parser-1.1.2-14.1.el6.i686.rpmyum-3.2.27-14.el6.centos.noarch.rpmyum-plugin-fastestmirror-1.1.26-1.el6.noarch.rpm3、安裝yum軟件包#rpm-ivhpytho
5、n-iniparse-0.3.1-2.1.el6.noarch.rpm#rpm-ivhyum-metadata-parser-1.1.2-14.1.el6.i686.rpm#rpm-ivhyum-3.2.27-14.el6.centos.noarch.rpmyum-plugin-fastestmirror-1.1.26-11.el6.noarch.rpm 注意:最后兩個安裝包要放在一起同時安裝,否則會提示相互依賴,安裝失敗。4、更改yum源??(示例使用網(wǎng)易的CentOS鏡像源)#cd/etc/yum.repos.d/#wgethttp://mirr
6、ors.163.com/.help/CentOS6-Base-163.repo#viCentOS6-Base-163.repo 編輯文件,把文件里面的$releasever全部替換為版本號,即6?最后保存!或者直接把下面的內(nèi)存拷貝到CentOS6-Base-163.repo文件中即可(已經(jīng)修改好)[base]name=CentOS-6-Base-163.combaseurl=http://mirrors.163.com/centos/6/os/$basearch/#mirrorlist=http://mirrorlist.centos.org/?re
7、lease=6&arch=$basearch&repo=osgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#releasedupdates[updates]name=CentOS-6-Updates-163.combaseurl=http://mirrors.163.com/centos/6/updates/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&r
8、epo=updatesgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additionalpackagesthatmaybeuseful[extras]name=CentOS-6-Extras-163.combaseurl=http://mirrors.163.com/centos/6/extras/$basearch/#mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=
9、extrasgpgcheck=1gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6#additionalpackagesthatextendfunctionalityofexistingpackages[centosplus]name=CentOS-6-Plus-163.combaseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/#mirrorlist=http://mirrorlist.centos.org/?rel
10、ease=6&arch=$basearch&repo=centosplusgpgcheck=1