现在设置源吧,首先你要google一下livna的源,把 它加进去 。如下:
su
Password:
# rpm -ivh http://rpm.livna.org/livna-release-8.rpm
安装fastestmirror插件。
yum install yum-fastestmirror
好了,该到设置yum了:
gedit /etc/yum/yum-updatesd.conf
其配置如下:
[main]
# how often to check for new updates (in seconds)
run_interval = 604800
#多久检查更新,我设置成了7天
# how often to allow checking on request (in seconds)
updaterefresh = 600
#更新刷新周期,这个是为了避免服务器负担太重,建议保持默认,或者设置大点。
# how to send notifications (valid: dbus, email, syslog)
emit_via = dbus
# should we listen via dbus to give out update information/check for
# new updates
dbus_listener = yes
#以下三项为:是否自动安装更新,是否自动下载更新,是否自动下载依赖,建议全部设置成no,否则系统会在后台自动更新,导致前台的所有安装和更新程序被锁死。
# automatically install updates
do_update = no
# automatically download updates
do_download = no
# automatically download deps of updates
do_download_deps = no
设置fastestmirror
默认的fastestmirror并不是每次都能找到最快的源。
要进行一点算是优化的设置:
gedit /etc/yum/pluginconf.d/fastestmirror.conf
配置如下:
[main]
enabled=1
verbose=0
socket_timeout=1
hostfilepath=/var/cache/yum/timedhosts.txt
maxhostfileage=1
#设置成1,即每一天刷新一次镜像的速度
maxthreads=15
#exclude=.gov, facebook
做了如上设置后也许你还是连不上最快的镜像,这时就要RP和刷新了
yum clean all
这样可以清除镜像的记录,让yum重新刷新