how to use proxy on centos7¶
system
edit /etc/profile, like this:
vi /etc/profile all_proxy=socks5://username:[email protected]:port no_proxy=127.0.0.1,10.0.0.0/8,172.0.0.0/8,192.0.0.0/8 export all_proxy no_proxy source /etc/profiledocker
edit /usr/lib/systemd/system/docker.service, like this:
vi /usr/lib/systemd/system/docker.service [Service] Environment=HTTP_PROXY=socks5://username:[email protected]:port Environment=NO_PROXY=127.0.0.1,10.0.0.0/8,172.0.0.0/8,192.0.0.0/8 systemctl daemon-reload && systemctl restart dockernow, you can smoothly install kubernetes in china.
yum
edit /etc/yum.conf, like this:
vi /etc/yum.conf [main] proxy=socks5://ip:port proxy_username=user proxy_password=password