zoukankan      html  css  js  c++  java
  • CentOS7设置系统/yum以及firefox web代理上网

    一.系统全局的代理设置;

    1. 用vi/vim编辑器打开/etc/profile,追加如下内容:

    http_proxy=http://192.168.78.124:8080
    ftp_proxy=http://192.168.78.124:8080
    export http_proxy
    export ftp_proxy
     

        如果需要输入账号和密码,则追加的内容如下:

    http_proxy=http://username:passwd@192.168.78.124:8080
    ftp_proxy=http://username:passwd@192.168.78.124:8080
    export http_proxy
    export ftp_proxy
     

        另外,如果不想做全局配置,只为某一用户配置,例如root,则可以将上述内容之一配置追加到/root/.bash_profile

    二.yum的代理设置;

    1. 用vi/vim编辑器打开/etc/yum.conf,追加如下内容:

    http_proxy=http://192.168.78.124:8080
    ftp_proxy=http://192.168.78.124:8080
     

        或者:

    http_proxy=http://192.168.78.124:8080
    ftp_proxy=http://192.168.78.124:8080
    proxy_username=username
    proxy_password=password
     

        另外,ubuntu的OS apt-get代理联网设置可以用如下方法:

    echo 'Acquire::http::proxy “http://192.168.78.124:8080”;' > /etc/apt/apt.conf
     

     三.wget的代理设置;

    1. 用vi/vim编辑器打开/etc/wgetrc,找到代理设置所在行,然后追加如下内容:

    # You can set the default proxies for Wget to use for http, https, and ftp.
    # They will override the value in the environment.
    #https_proxy = http://proxy.yoyodyne.com:18023/
    #http_proxy = http://proxy.yoyodyne.com:18023/
    #ftp_proxy = http://proxy.yoyodyne.com:18023/
    http_proxy=http://192.168.78.124:8080/
    ftp_proxy=http://192.168.78.124:8080/
     

        说明:如果需要设置用户名和密码,依照上述格式即可。

    四.firefox浏览器代理联网设置;

        说明:设置路径,Edit--> Preferences-->Advanced-->Network-->Settings.

        wKiom1UsthXhIuU5AAIaAmMEAfw630.jpg

    五.附注

    1. 192.168.78.124为代理联网服务器IP地址;

    2. 8080为自定义端口号。

        End.

  • 相关阅读:
    Oracle 获取本周、本月、本季、本年的第一天和最后一天(转载)
    easyui tabs页签显示在底部属性
    java mybatis XML文件中大于号小于号转义(转载)
    原生JS日历 + JS格式化时间格式
    ajax之async属性
    Easyui 行编辑
    css中实现显示和隐藏(转)
    layer弹出层 获取index
    js中关于json常用的内容、js将数字保留两位小数
    发布项目到github上web服务器来运行
  • 原文地址:https://www.cnblogs.com/ExMan/p/9579828.html
Copyright © 2011-2022 走看看