In order to configure system wide proxy settings, follow these steps (these should be applicable to all distros)
vi /etc/profile.d/proxy.sh
Populate the file with the following lines
MY_PROXY_URL="prox.srv.world:3128"
HTTP_PROXY=$MY_PROXY_URL
HTTPS_PROXY=$MY_PROXY_URL
FTP_PROXY=$MY_PROXY_URL
http_proxy=$MY_PROXY_URL
https_proxy=$MY_PROXY_URL
ftp_proxy=$MY_PROXY_URL
export HTTP_PROXY HTTPS_PROXY FTP_PROXY http_proxy https_proxy ftp_proxy
Save and exit (:wq
)
Then run source /etc/profile.d/proxy.sh
You can verify the settings by doing env | grep -i http
Assuming BASH is the default shell, then add the following to the .bash_profile
.
# The web proxy server used by this account
http_proxy="http://proxy.dell-halle.local:3128"
export http_proxy
or if a user name and password is required then do the following:
# The web proxy server used by this account
http_proxy="http://[USER:PASS]@proxy.dell-halle.local:3128"
export http_proxy
for ZSH, use .zsh_profile
(probably)
If already logged in, you will need to run
source .bash_profile
or log out/in
To configure a proxy for apt, follow these steps
vi /etc/apt/apt.conf.d/proxy.conf
Once in vi, add the following:
Acquire {
HTTP::proxy "http://127.0.0.1:8080";
HTTPS::proxy "http://127.0.0.1:8080";
}
Press Esc then :wq to write the file and quit vi.
Run apt update
to confirm connection is working
Edit the yum.conf file vi /etc/yum.conf
Add the following lines
# The proxy server - proxy server:port number
proxy=http://proxy.dell-halle.local:3128
# Acount details, if needed
proxy_username=yum-user
proxy_password=yum_password
Press Esc then :wq to write the file and quit vi.
Run yum update
to confirm yum can now connect
Edit the 'dnf.conf' file vi /etc/dnf/dnf.conf
Add the following line
# The proxy server - proxy server:port number
proxy=http://proxy.dell-halle.local:3128
# Acount details, if needed
proxy_username=dnf-user
proxy_password=dnf-password
Press Esc then :wq to write the file and quit vi.
Run dnf update
to confirm dnf can now connect