歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> 學習Linux >> CentOS設置各種代理上網

CentOS設置各種代理上網

日期:2017/3/6 9:47:46   编辑:學習Linux

CentOS設置各種代理上網


CentOS設置各種代理上網


假設我們要設置代理為 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即可

http://xxxxxx/Linuxjc/1134233.html TechArticle

Copyright © Linux教程網 All Rights Reserved