linux yum 代理设置
yum代理设置
?
修改 /etc/yum.conf
http代理加入下面这一行
proxy=http://IP地址:端口
ftp代理加入下面这一行//没有试过
proxy=ftp://IP地址:端口
保存退出即可(以上内容不能放在文件最开始的地方)
添加yum的源
/etc/yum.repos.d/sjtu.repo?
-----------------------------------------
[Fedora-ftp.sjtu.edu.cn]
name=Fedora 12 - i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/12/Fedora/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[Everything-ftp.sjtu.edu.cn]
name=Everything 12 - i386
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/releases/12/Everything/i386/os/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
[updates-ftp.sjtu.edu.cn]
name=Fedora updates
baseurl=http://ftp.sjtu.edu.cn/fedora/linux/updates/12/i386/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
------------------------------------------------
然后yum update
?
sjtu.repo这个是更新文件路径称为源
?
------------------------------------------------
也可以在命令行里 先执行这个 ?在运行?
export http_proxy="http://192.168.0.102:3128"
------------------------------------------------
http://hi.baidu.com/zjunmm/blog/item/26d5a71d41c4d311413417e3.html
感谢作者分享 转自?
?