中文
注册

配置网络代理

如果服务器无法直接访问外网,则需要配置网络代理。

  1. 修改profile文件。
    1. 打开“/etc/profile”文件。
      vi /etc/profile
    2. 在/etc/profile文件中增加以下内容(根据实际情况填写)。
      1
      2
      3
      export http_proxy="http://用户名:密码@代理IP:代理端口"
      export https_proxy=$http_proxy
      export no_proxy=127.0.0.1,.huawei.com,localhost,local,.local
      
    3. 使代理生效。
      source /etc/profile
  2. 确认是否可以访问外网。
    curl www.baidu.com
搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词