linux設定代理上網
原文地址
本文以centos7.0為例,記錄代理伺服器設定過程
全域性的代理設定
編輯profile檔案,新增proxy
# vim /etc/profile
export http_proxy = http://username:[email protected]_ip:port/
export ftp_proxy = http://username:[email protected]_ip:port/
# source /etc/profile
yum的代理設定
編輯yum.conf,新增proxy
# vim /etc/yum.conf
proxy = http://username: [email protected]_ip:port/
或
proxy=http://proxy_ip:port
proxy=ftp://proxy_ip:port
proxy_username=username
proxy_password=password
Wget的代理設定
編輯wgetrc檔案,新增proxy
# vim /etc/wgetrc
# Proxy
http_proxy=http://username:[email protected]_ip:port/
ftp_proxy=http://username:[email protected]_ip:port/