|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们!1、当地yum源
1、体系默许已装置了可以使用yum的软件包,以是能够间接设置:
[root@localhost~]#cd/etc/yum.repos.d/yum源设置文件安排目次
[root@localhostyum.repos.d]#mvCentOS-Base.repoCentOS-Base.repo.bak先将收集yum源设置文件改名(让其生效)
[root@localhostyum.repos.d]#vimCentOS-Media.repo编纂当地yum源文件
[c6-media]
name=CentOS-$releasever-Media当地yum源称号(可随便修正)
baseurl=file:///mnt/sr0光盘挂载目次/mnt/sr0
gpgcheck=1
enabled=1利用此yum源(即是0为不启用)
gpgkey=file:///mnt/sr0/RPM-GPG-KEY-CentOS-6当地yum源密钥
2、收集yum源(条件是必需能连上互联网,此处利用的yum源是中国科技年夜学的地点以下:
中国科技年夜学:http://centos.ustc.edu.cn/centos/)
[root@localhostyum.repos.d]#mvCentOS-Base.bakCentOS-Base.repo假如之前没改名就不必操纵此步调
[root@localhostyum.repos.d]#vimCentOS-Base.repo编纂收集yum源文件
[base]
name=CentOS-$releasever-Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://centos.ustc.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#releasedupdates
[updates]
name=CentOS-$releasever-Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://centos.ustc.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additionalpackagesthatmaybeuseful
[extras]
name=CentOS-$releasever-Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://centos.ustc.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additionalpackagesthatextendfunctionalityofexistingpackages
[centosplus]
name=CentOS-$releasever-Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://centos.ustc.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib-packagesbyCentosUsers
[contrib]
name=CentOS-$releasever-Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://centos.ustc.edu.cn/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
3、注重事项:
利用yum时最好只能让一个yum源失效,由于体系默许优先利用收集yum源。
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们! |
|