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设置上网代理

相关文章
相关标签/搜索