for WGET
editing sudo vim /etc/wgetrc
and edited the following:
# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
#https_proxy = http://proxy.yoyodyne.com:18023/
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/
# If you do not want to use proxy at all, set this to off.
#use_proxy = on
You need to remove the comment (#) at the beginning of the last 4 lines shown here.
for YUM
we are going to configure YUM software to use proxy to get LINUX updated with new softwares all the times with repositories available on internet.
1) Configure yum.conf
sudo vim /etc/yum.conf
enter following lines at bottom of [main] section
proxy=http://yourproxyaddress:port/
proxy_username=youruser
proxy_password=yourpassword
2) Open a Terminal and Export http_proxy variable
export http_proxy=”http://yourproxyaddress:port/”
export ftp_proxy=”http://yourproxyaddress:port/”
3) Export http_proxy variable in bash login script
gedit /home/<username>/.bashrc_profile &
export http_proxy=”http://yourproxyaddress:port/”
export ftp_proxy=”http://yourproxyaddress:port/”
This will help you to export http_proxy variable automatically everytime you login.
Now use “yum list” command to check for its working.
yum list
Documentation
man yum.conf