CentOS設置上網代理

CentOS設置上網代理

假設我們要設置代理爲 IP:PORT

1、網頁上網

網頁上網設置代理很簡單,在firefox瀏覽器下 Edit-->>Preferences-->>Advanced-->>Network

在Connection下點擊Settings,裏面的manual proxy configuration裏設置IP和PORT即可,也可以使用軟件proxifier進行配置,這裏我使用的是軟件。

2、yum代理設置

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
proxy=http://xxx.xxx:8080

3、wget代理設置

編輯文件爲:/etc/wgetrc
添加下面兩行:

http_proxy = http://xxx.xxx:8080
ftp_proxy = http://xxx.xxx:8080

4、系統環境代理設置

編輯文件爲/etc/profile,如果只想給自己的賬戶設置,則編輯~/.bashrc即可

添加三行:

export http_proxy="http://xxx.xxx:8080"
export https_proxy="http://xxx.xxx:8080"
export ftp_proxy=$http_proxy

然後source /etc/profile 或者source ~/.bashrc即可

5、使用CRT軟件客戶端進行連接

因爲我使用的是軟件全局代理,導致使用crt 軟件不能正常的去連接虛擬機客戶端,在這裏我需要進行配置,不讓軟件走代理,直接去連接虛擬機。

CentOS設置上網代理

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