centos硬盘安装的时候,一激动没选x-windows,又不会利用安装盘升级,只能在网上update了,利用上交的资源更新,以下是文件配置:
/**********************************/
#/etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-5.2 - Base
baseurl=http://ftp.sjtu.edu.cn/centos/5.2/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#released updates
[update]
name=CentOS-5.2 - Updates
baseurl=http://ftp.sjtu.edu.cn/centos/5.2/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.2 - Addons
baseurl=http://ftp.sjtu.edu.cn/centos/5.2/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
#additional packages that may be useful
[extras]
name=CentOS-5.2 - Extras
baseurl=http://ftp.sjtu.edu.cn/centos/5.2/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.2 - Plus
baseurl=http://ftp.sjtu.edu.cn/centos/5.2/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5
/***************************/
最近教育网络有点问题,直接连不过去了,幸好实验室还有代理做救命稻草。。。代理的设置格式有点严格,开始报了不晓得的错误
/***************************/
Traceback (most recent call last):
File "/usr/bin/
yum", line 8, in ?
yummain.main(sys.argv[1:])
File "/usr/share/
yum-cli/yummain.py", line 51, in main
base.getOptionsConfig(args)
File "/usr/share/
yum-cli/cli.py", line 133, in getOptionsConfig
self.conf = yumconf(configfile = yumconffile, root=root)
File "/usr/lib/python2.3/site-packages/
yum/config.py", line 227, in __init__
self._doFileRepo(fn)
File "/usr/lib/python2.3/site-packages/
yum/config.py", line 299, in _doFileRep o
doRepoSection(self, repoconf, section)
File "/usr/lib/python2.3/site-packages/
yum/config.py", line 313, in doRepoSect ion
mirrorurls = getMirrorList(mirrorlist)
File "/usr/lib/python2.3/site-packages/
yum/config.py", line 390, in getMirrorL ist
fo = urlresolver.urlopen(url)
File "/usr/lib/python2.3/site-packages/urlgrabber/grabber.py", line 427, in ur lopen
return default_grabber.urlopen(url, **kwargs)
File "/usr/lib/python2.3/site-packages/urlgrabber/grabber.py", line 555, in ur lopen
return self._retry(opts, retryfunc, url)
File "/usr/lib/python2.3/site-packages/urlgrabber/grabber.py", line 527, in _r etry
return apply(func, (opts,) + args, {})
File "/usr/lib/python2.3/site-packages/urlgrabber/grabber.py", line 554, in re tryfunc
return URLGrabberFileObject(url, filename=None, opts=opts)
File "/usr/lib/python2.3/site-packages/urlgrabber/grabber.py", line 703, in __ init__
self._do_open()
File "/usr/lib/python2.3/site-packages/urlgrabber/grabber.py", line 747, in _d o_open
fo, hdr = self._make_request(req, opener)
File "/usr/lib/python2.3/site-packages/urlgrabber/grabber.py", line 823, in _m ake_request
fo = opener.open(req)
File "/usr/lib/python2.3/urllib2.py", line 326, in open
'_open', req)
File "/usr/lib/python2.3/urllib2.py", line 306, in _call_chain
result = func(*args)
File "/usr/lib/python2.3/urllib2.py", line 491, in <lambda>
lambda r, proxy=url, type=type, meth=self.proxy_open: \
File "/usr/lib/python2.3/urllib2.py", line 498, in proxy_open
if '@' in host:
TypeError: iterable argument required
/***************************/
,以下是正确的设置方法:
/**************************/
# ~/.bash_profile
export http_proxy=http://59.72.109.7:56789/
export ftp_proxy=http://59.72.109.7:56789/
/**************************/
最后:
#yum update
。。。。。
export http_proxy=http://192.216.224.4:8080/
export ftp_proxy=http://192.216.224.4:8080/
http://hi.baidu.com/kylcnjfpsskqvyr/item/4c4c67f7cb92e7713c198b46