添加代理

添加http代理
export http_proxy='h3c\bgw2988:817520bwjAAA@proxy02.h3c.com:8080'
1 为docker服务创建一个内嵌的systemd目录和conf文件
mkdir -p /etc/systemd/system/docker.service.d
cat >> /etc/systemd/system/docker.service.d/http-proxy.conf<<EOF
[Service]
Environment="HTTP_PROXY=http://proxy02.h3c.com:8080/"
Environment="HTTPS_PROXY=http://proxy02.h3c.com:8080/"
Environment="NO_PROXY=localhost,127.0.0.1 "
EOF
清除代理
unset http_proxy

pip install --proxy="h3c\bgw2988:817520bwjAAA@proxy02.h3c.com:8080" packagename

yum代理
cat >>/etc/yum.conf <<EOF
export http_proxy='h3c\bgw2988:817520bwjAAA@proxy02.h3c.com:8080'
proxy=http://proxy02.h3c.com:8080
proxy_username=bgw2988
proxy_password=817520bwjAAA
EOF

上一篇:H3C ipv6 ospf多区域配置实例


下一篇:H3C开启SSH 登录