linux设置代理上网

来源:互联网 发布:湖北大学知行学院后街 编辑:程序博客网 时间:2024/05/17 03:16

原文地址
本文以centos7.0为例,记录代理服务器设置过程

全局的代理设置

编辑profile文件,添加proxy

# vim /etc/profileexport http_proxy = http://username:password@proxy_ip:port/export ftp_proxy = http://username:password@proxy_ip:port/# source /etc/profile

yum的代理设置

编辑yum.conf,添加proxy

# vim /etc/yum.confproxy = http://username:password@proxy_ip:port/或proxy=http://proxy_ip:portproxy=ftp://proxy_ip:portproxy_username=usernameproxy_password=password

Wget的代理设置

编辑wgetrc文件,添加proxy

# vim /etc/wgetrc# Proxyhttp_proxy=http://username:password@proxy_ip:port/ftp_proxy=http://username:password@proxy_ip:port/
0 0