|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
欢迎大家来到仓酷云论坛!CentOS装置终了,起首应当修正更新源,并晋级到最新的体系。
国际速率对照快的更新源,我保举:
http://mirrors.163.com网易的更新源,刚发明的,速率还能够。
起首我们得先备份体系先前的设置文件CentOS-Base.repo:
sudocp/etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.bak
编纂yum的设置文件:
sudovi/etc/yum.repos.d/CentOS-Base.repo
把CenOS-Base-repo内文件的中的mirrorlist正文失落,然后把baseurl前的正文往失落,然后把源地点改成网易的
设置文件的内容为:
[base]
name=CentOS-$releasever-Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#releasedupdates
[updates]
name=CentOS-$releasever-Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#packagesused/producedinthebuildbutnotreleased
[addons]
name=CentOS-$releasever-Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additionalpackagesthatmaybeuseful
[extras]
name=CentOS-$releasever-Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#additionalpackagesthatextendfunctionalityofexistingpackages
[centosplus]
name=CentOS-$releasever-Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#contrib-packagesbyCentosUsers
[contrib]
name=CentOS-$releasever-Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
个中:
repositoryid:用于指定一个堆栈
name:用于指定易读的堆栈称号
baseurl:用于指定本堆栈的URL,能够是以下的3品种型,如http,ftp,file
mirrorlist:用于指定堆栈的镜像站点
enable:用于指定是不是利用本堆栈,默许值为1,便可用。
gpgcheck:用于指定是不是反省软件包的GPG署名。
gpgkey:用于指定GPG署名文件的URL。
自己一样平常都是用root超等用户
假如是一般用户就在下令最后面加上sudo
实行下令:
rpm--import/etc/pki/rpm-gpg/RPM-GPG-KEY*
yumupdate
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的小伙伴们! |
|