CentOS 7 - Proxy Server
-
So.....
http_proxy=http://proxy_server_address:port
Doesn't work
http_proxy=http://proxy_server_address:port yum -y update
Works
-
I'm guessing you were not putting it into your profile or rc script to add it to your shell and were spawning a new shell without the proxy setting.
-
@scottalanmiller I need to export it and reboot? Confused
-
@anonymous said:
@scottalanmiller I need to export it and reboot? Confused
No, you have to add it to one of the files mentioned in order for it to apply after a reboot.
-
@scottalanmiller but I never rebooted.....
-
@anonymous said:
@scottalanmiller but I never rebooted.....
I didn't say that you did, I said that you spawned a new shell.
-
To enable all yum operations to use a proxy server, specify the proxy server details in /etc/yum.conf. The proxy setting must specify the proxy server as a complete URL, including the TCP port number. If your proxy server requires a username and password, specify these by adding proxy_username and proxy_password settings.
The settings below enable yum to use the proxy server mycache.mydomain.com, connecting to port 3128, with the username yum-user and the password qwerty.
# The proxy server - proxy server:port number proxy=http://mycache.mydomain.com:3128 # The account details for yum connections proxy_username=yum-user proxy_password=qwerty