zoukankan      html  css  js  c++  java
  • linux设置上网代理

    一、为系统设置代理

    编辑文件/etc/profile,增加如下两行

    export http_proxy=http://proxy.com:8080/
    export https_proxy=http://proxy.com:8080/
    
    • 1
    • 2

    然后更新一下环境文件:

    source /etc/profile
    
    • 1

    二、为yum配置代理

    在/etc/yum.conf后面添加以下内容:
    如果代理不需要用户名密码认证:

    proxy=http://proxy.com:8080/
    
    • 1

    如果需要认证

    proxy=http://proxy.com:8080/
    proxy_username=代理服务器用户名
    proxy_password=代理服务器密码
    
    • 1
    • 2
    • 3

    然后更新一下环境文件:

    #使用source后者source yum.conf
    source
    source /etc/yum.conf
    
    • 1
    • 2
    • 3

    三、为wget代理设置:

    编辑文件为:/etc/wgetrc
    添加下面两行:

    http_proxy=http://proxy.com:8080/
    https_proxy=http://proxy.com:8080/
    
    • 1
    • 2

    然后更新一下环境文件:

    #使用source后者source /etc/wgetrc
    source
    source /etc/wgetrc 
    
    • 1
    • 2
    • 3

    四、网页上网

    网页上网设置代理很简单,在firefox浏览器下 Edit–>>Preferences–>>Advanced–>>Network
    在Connection下点击Settings,里面的manual proxy configuration里设置IP和PORT即可

    本篇文章出自“国民时代”,转载请注明转载出处。
  • 相关阅读:
    学生管理系统简化版
    图形用户界面编程——事件驱动编程
    图形界面编程
    集合框架
    多线程编程
    反射
    相关类
    异常(4.13)
    接口
    锁!代码锁
  • 原文地址:https://www.cnblogs.com/ChinaGo/p/14230192.html
Copyright © 2011-2022 走看看