CentOS yum configuration agent


Add the following configuration at the end of the vi /etc/yum.conf file. If the proxy does not require authentication, do not configure the following two lines
proxy=http://192.168.1.1:8080
proxy_username=username
proxy_password=password

You can also configure
export http_proxy="http://username:[email protected]:8080" by setting environment variables 

export https_proxy="http://username:[email protected]:8080"

Clear environment variables to cancel proxy configuration
unset http_proxy
 

Guess you like

Origin blog.csdn.net/allway2/article/details/108534372