yum設置代理(公司內網)

1. /etc/yum.conf 添加 proxy=http://username:password@IP地址:端口/
2. /etc/profile 文件 添加以下內容
http_proxy=http://username:password@IP地址:端口/
ftp_proxy=http://username:password@IP地址:端口/
export http_proxy
export ftp_proxy
3. 配置 163 的yum 

備份/etc/yum.repos.d/CentOS-Base.repo

下載 163的CentOS-Base.repo
http://mirrors.163.com/.help/CentOS7-Base-163.repo

替換原來的CentOS-Base.repo

yum clean all
yum makecache

代理設置完畢。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章