• linux设置上网代理


    1、网页上网

    网页上网设置代理很简单,在firefox浏览器下 Edit-->>Preferences-->>Advanced-->>Network

    在Connection下点击Settings,里面的manual proxy configuration里设置IP和PORT即可

    2、yum代理设置

    编辑文件为:/etc/yum.conf

    在里面添加这一行:
    proxy = http://IP:PORT

    这里的IP 为你要设置的IP ,PORT 是你要设置的端口

    3、wget代理设置

    编辑文件为:/etc/wgetrc
    添加下面三行:
    http_proxy = http://IP:PORT
    https_proxy = http://IP:PORT
    ftp_proxy = http://IP:PORT

    4、系统环境代理设置

    编辑文件为vim /etc/profile,如果只想给自己的账户设置,则编辑~/.bashrc即可

    添加三行:

    # add proxy for network
    export http_proxy=http://IP:PORT
    export https_proxy=http://IP:PORT
    export ftp_proxy=http://IP:PORT

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

    Ubuntu設置代理:
    sudo gedit /etc/wgetr
    http_proxy = http://IP:PORT
    https_proxy = http://IP:PORT
    ftp_proxy = http://IP:PORT

    sudo gedit /etc/apt/apt.conf
    Acquire::http::proxy "http://IP:PORT/";
    Acquire::https::proxy "http://IP:PORT/";
    Acquire::ftp::Proxy "ftp://IP:PORT/";

  • 相关阅读:
    HDU
    HYSBZ
    HDU
    POJ
    HDU
    HDU
    HDU
    「luogu2680」[NOIp2015] 运输计划
    「luogu1417」烹调方案
    网络(最大)流初步+二分图初步 (浅谈EK,Dinic, Hungarian method:]
  • 原文地址:https://www.cnblogs.com/taihao/p/13566196.html
Copyright © 2020-2023  润新知