YUM proxy settings
Edit/etc/yum. conf and add
# Proxy
Proxy = http: // username: password @ proxy_ip: port/
You can also use proxy_username and proxy_password to configure the proxy username and password.
After such configuration is complete, all users will use a proxy when using yum, which can be called a Global Proxy.
If you need to configure a proxy for a separate user, you can ~ /. Bash_profile.
Wget proxy settings
Edit/etc/wgetrc and add
# Proxy
Http_proxy = http: // username: password @ proxy_ip: port/
Ftp_proxy = http: // username: password @ proxy_ip: port/
System Global Proxy
If you need to set a system-level proxy for a user, you can ~ /. Bash_profile:
Http_proxy = "http: // username: password @ proxy_ip: port"
Export_http_proxy
The above settings only take effect for a user. To take effect for all system users, write them in/etc/profile.