For CentOS / RHEL utilities to use a proxy server instead of direct access, add the following lines to the end of the file "/etc/profile":
MY_PROXY_URL="http://user:password@proxyserver:8080"
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
Run to apply: "source /etc/profile".
If you need to make settings for a specific user, add these lines to the end of the file ".bash_profile", located in the user home directory ("cd ~"). Apply with the command "source ~/.bash_profile".
MY_PROXY_URL="http://user:password@proxyserver:8080"
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
Run to apply: "source /etc/profile".
If you need to make settings for a specific user, add these lines to the end of the file ".bash_profile", located in the user home directory ("cd ~"). Apply with the command "source ~/.bash_profile".
No comments:
Post a Comment