CentOS設置上網代理

CentOS設置上網代理

假設咱們要設置代理爲 IP:PORTphp

一、網頁上網

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

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

二、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

三、wget代理設置

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

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

四、系統環境代理設置

編輯文件爲/etc/profile,若是隻想給本身的帳戶設置,則編輯~/.bashrc便可bash

添加三行:ide

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

而後source /etc/profile 或者source ~/.bashrc便可url

五、使用CRT軟件客戶端進行鏈接

由於我使用的是軟件全局代理,致使使用crt 軟件不能正常的去鏈接虛擬機客戶端,在這裏我須要進行配置,不讓軟件走代理,直接去鏈接虛擬機。firefox

CentOS設置上網代理

相關文章
相關標籤/搜索