2014年7月21日 星期一

設定YUM Repositories

YUM Repositories Mirror List
查詢Mirror List: http://mirrorlist.centos.org/?release=6.5&arch=x86_64&repo=os http://mirror01.idc.hinet.net/CentOS/6.5/os/x86_64/
http://ftp.tc.edu.tw/Linux/CentOS/6.5/os/x86_64/ http://ftp.stu.edu.tw/Linux/CentOS/6.5/os/x86_64/ http://ftp.stust.edu.tw/pub/Linux/CentOS/6.5/os/x86_64/ http://ftp.nsysu.edu.tw/CentOS/6.5/os/x86_64/ http://ftp.isu.edu.tw/pub/Linux/CentOS/6.5/os/x86_64/ http://ftp.twaren.net/Linux/CentOS/6.5/os/x86_64/ http://mirrors.skyshe.cn/centos/6.5/os/x86_64/ http://centos.ustc.edu.cn/centos/6.5/os/x86_64/ http://mirrors.hust.edu.cn/centos/6.5/os/x86_64/ 手動設定Repositories # cd /etc/yum.repos.d # cp ./CentOS-Base.repo ./CentOS-Base.repo.bak # vi ./CentOS-Base.repo
# CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # # [base] name=CentOS-$releasever - Base #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os baseurl=http://mirror01.idc.hinet.net/CentOS/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirror01.idc.hinet.net/CentOS/RPM-GPG-KEY-CentOS-6 #released updates [updates] name=CentOS-$releasever - Updates #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates baseurl=http://mirror01.idc.hinet.net/CentOS/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirror01.idc.hinet.net/CentOS/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras baseurl=http://mirror01.idc.hinet.net/CentOS/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirror01.idc.hinet.net/CentOS/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus baseurl=http://mirror01.idc.hinet.net/CentOS/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror01.idc.hinet.net/CentOS/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib baseurl=http://mirror01.idc.hinet.net/CentOS/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirror01.idc.hinet.net/CentOS/RPM-GPG-KEY-CentOS-6

使用光碟或其他離線檔案安裝套件
# vi ./CentOS-Media.repo
# CentOS-Media.repo # # This repo can be used with mounted DVD media, verify the mount point for # CentOS-6. You can use this repo and yum to install items directly off the # DVD ISO that we release. # # To use this repo, put in your DVD and use it with the other repos too: # yum --enablerepo=c6-media [command] # # or for ONLY the media repo, do this: # # yum --disablerepo=\* --enablerepo=c6-media [command] [c6-media] name=CentOS-$releasever - Media baseurl=file:///media/CentOS/ file:///media/cdrom/ file:///media/cdrecorder/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

沒有留言:

張貼留言