杞細http://www.cnblogs.com/yisohoo/articles/1423940.html
鎴戣繖浣跨敤 cu 璁哄潧 涓嬬殑 rhel-5.1-server-i386-dvd.iso 瀹夎閰嶇疆
浠ュ墠鐢╢edora閰嶇疆yum寰堟柟渚?鍙槸鏉ュ埌RHLE灝變笉鏄偅涔堥『鎵嬩簡,濡傛灉涓嶅仛濡備笅璁劇疆,緇忓父鍑虹幇涓嶈兘閫氳繃yum瀹夎杞歡鐨勬儏鍐?涓嬮潰鏄緇嗛厤緗?緗戜笂鎵劇殑)
棣栧厛錛宺hel5緋葷粺瀹夎鐨勬椂鍊欏叾瀹炲凡緇忔湁yum浜嗭紝鍙槸鍥犱負濡傛灉鐢ㄥ畼鏂圭殑緗戠珯鏇存柊鐨勮瘽闄ら潪浣犳槸鐢ㄩ挶涔扮殑rhel5.鍚﹀垯瀹冧細鎻愮ず娉ㄥ唽涔嬬被鐨勩傛墍浠ュ彧瑕佹妸
yum鐨勬洿鏂板湴鍧鏀規(guī)垚寮婧愮殑灝辮浜嗐傝岄檺瀹歽um鏇存柊鍦板潃鐨勬枃浠跺湪/etc/yum.repos.d/閲屻傚厛鎶婂畠浠敼鎴?strong>澶囦喚鏂囦歡錛屽嵆鍦ㄥ悗闈㈠姞.bak銆?
[root@killgoogle ~]# mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.bak
[root@killgoogle ~]# mv /etc/yum.repos.d/rpmforge.repo.rpmnew /etc/yum.repos.d/rpmforge.repo.rpmnew.bak
寤虹珛鏂扮殑閰嶇疆鏂囦歡錛?
[root@killgoogle ~]# cd /etc/yum.repos.d
[root@killgoogle ~]# touch rhel-debuginfo.repo
[root@killgoogle ~]# touch mirrors-rpmforge
[root@killgoogle ~]# touch rpmforge.repo
寰鏂扮殑閰嶇疆鏂囦歡鍐欎笢瑗匡細
[root@killgoogle ~]#vi rhel-debuginfo.repo
[base]
name=CentOS-5 - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&
repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=CentOS-5 - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#packages used/produced in the build but not released
[addons]
name=CentOS-5 - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons
baseurl=http://ftp.sjtu.edu.cn/centos/5/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=CentOS-5 - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/5/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/5/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#contrib - packages by Centos Users
[contrib]
name=CentOS-5 - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
# vi dag.repo
[dag]
name=Dag RPM Repository for RHEL5
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el5/en/$basearch/dag/
enabled=1
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt
淇敼絎簩涓厤緗枃浠訛細
[root@killgoogle ~]vi mirrors-rpmforge
http://apt.sw.be/redhat/el5/en/$ARCH/dag
http://archive.cs.uu.nl/mirror/dag.wieers/redhat/el5/en/$ARCH/dag
http://ftp2.lcpe.uni-sofia.bg/freshrpms/pub/dag/redhat/el5/en/$ARCH/dag
#http://ftp.heanet.ie/pub/freshrpms/pub/dag/redhat/el5/en/$ARCH/dag
http://ftp-stud.fht-esslingen.de/dag/redhat/el5/en/$ARCH/dag
http://mirror.cpsc.ucalgary.ca/mirror/dag/redhat/el5/en/$ARCH/dag
http://mirrors.ircam.fr/pub/dag/redhat/el5/en/$ARCH/dag
http://rh-mirror.linux.iastate.edu/pub/dag/redhat/el5/en/$ARCH/dag
http://rpmfind.net/linux/dag/redhat/el5/en/$ARCH/dag
http://wftp.tu-chemnitz.de/pub/linux/dag/redhat/el5/en/$ARCH/dag
http://www.mirrorservice.org/sites/apt.sw.be/redhat/el5/en/$ARCH/dag
淇敼絎笁涓厤緗枃浠訛細
[root@killgoogle ~]# vi rpmforge.repo
# Name: RPMforge RPM Repository for Red Hat Enterprise 5 - dag
# URL: http://rpmforge.net/
[rpmforge]
name = Red Hat Enterprise $releasever - RPMforge.net - dag
#baseurl = http://apt.sw.be/redhat/el5/en/$basearch/dag
mirrorlist = http://apt.sw.be/redhat/el5/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1
涓嬮潰鏈?縐嶆柟娉曪細
榪欑鎴戝皾璇曡繃錛屽湪鏈嶅姟鍣ㄤ笂宸叉惌寤哄ソ yum
鍙傝?錛?#160;http://www.linuxdiyf.com/viewarticle.php?id=70630
榪欓噷娉ㄦ剰
vi /etc/yum.conf
鍔犱笂榪欎箞涓鍙ワ細timeout=120
鍜?#160;CentOS-Base.repo 鏂囦歡涓殑 5.0 閮戒慨鏀逛負 5.2 灝卞彲浠ヤ簡
鏂規(guī)硶2 錛?/span>
濡傛灉椋庨熸參鐨勮瘽鍙互閫氳繃澧炲姞yum鐨勮秴鏃舵椂闂達紝榪欐牱灝變笉浼氭繪槸鍥犱負瓚呮椂鑰岄鍑恒?
[root@killgoogle ~]vi /etc/yum.conf
鍔犱笂榪欎箞涓鍙ワ細timeout=120
鍒拌繖閲岄厤緗樊涓嶅灝卞畬浜嗐傝繕鏈変竴涓寘闇瑕佸畨瑁咃細rpmforge-release-0.3.6-1.el5.rf.i386.rpm
濡傛灉涓嶅畨瑁呯殑璇濇湁鍙兘浼氬嚭鐜頒互涓嬮敊璇細GPG key retrieval failed: [Errno 5] OSError: [Errno 2] 娌℃湁閭d釜鏂囦歡鎴栫洰褰? '/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag'
鍒?a target="_blank">http://rpmfind.net/linux/RPM/鎵懼埌榪欎釜鍖咃紝鐒跺悗
[root@killgoogle ~]rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
#鎴戣繖瀹夎鍦板潃
#wget ftp://rpmfind.net/linux/dag/redhat/el5/en/i386/dag/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
鎺ヤ笅鏉ュ氨鏄緭鍏EY浜嗐?
[root@killgoogle ~] rpm --import http://mirror.be10.com/centos/RPM-GPG-KEY-CentOS-5
濡傛灉涓嶈璇蜂嬌鐢細 rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
璋㈣阿 涓夋ゼ錛屾垜榪欐湁鏃墮棿 鏍稿疄涓?鍛婅瘔澶у 銆?br />
榪欐牱鍩烘湰涓妝um灝卞彲浠ョ敤浜嗐備笉榪囧鏋滆寰椾笉鐖界殑璇濊繕鍙互浼樺寲錛?
鍔犻焬um
[root@killgoogle ~]yum install yum-fastestmirror yum-presto
鎸囧畾鎴栧幓鎺夎蔣浠舵簮鐨刴irror:
鍙互鍦╞aseurl涓皢姣旇緝鎱㈢殑mirror鍘繪帀
浣犵殑yum闀滃儚鐨勯熷害嫻嬭瘯璁板綍鏂囦歡錛?
/var/cache/yum/timedhosts.txt
yum Existing lock 閿欒鐨勮В鍐沖姙娉?
濡傛灉緋葷粺鍚姩鐨勬椂鍊欙紝 yum 鍑虹幇Existing lock /var/run/yum.pid: another copy is running as pid 3380. Aborting. 鍙互鐢ㄤ笅闈㈢殑鍔炴硶瑙e喅錛?
[root@killgoogle ~]/etc/init.d/yum-updatesd stop
涔熷彲浠ョ敤浠ヤ笅鏂規(guī)硶錛?
[root@killgoogle ~]rm -f /var/run/yum.pid
涓昏鍘熷洜灝辨槸yum鍦ㄨ嚜鍔ㄦ洿鏂板彧瑕佸叧鎺夊畠?yōu)鍙互浜?
瀹屼簡銆傜幇鍦ㄥ氨鍙互嫻嬭瘯鑳戒笉鑳界敤浜嗗摝錛?
[root@killgoogle ~]yum install mplayer
榪欐槸瀹夎mplayer濡傛灉瑕佸垹闄ゅ垯鏄細
[root@killgoogle ~]yum remove mplayer