Centos 下設定各種代理上網
阿新 • • 發佈:2019-01-24
假設我們要設定代理為 IP:PORT
1、網頁上網
網頁上網設定代理很簡單,在firefox瀏覽器下 Edit-->>Preferences-->>Advanced-->>Network
在Connection下點選Settings,裡面的manual proxy configuration裡設定IP和PORT即可
2、yum代理設定
編輯檔案為:/etc/yum.conf
在裡面新增這一行:proxy=IP:PORT
這裡的IP 為你要設定的IP ,PORT 是你要設定的埠
3、wget代理設定
編輯檔案為:/etc/wgetrc
新增下面兩行:
http_proxy = IP:PORT
ftp_proxy = IP:PORT
4、系統環境代理設定
編輯檔案為/etc/profile,如果只想給自己的賬戶設定,則編輯~/.bashrc即可
新增三行:
# add proxy for network
export http_proxy="http://child-prc.intel.com:913"
export https_proxy="http://child-prc.intel.com:913"
export ftp_proxy=$http_proxy
然後source /etc/profile 或者source ~/.bashrc即可