You are on page 1of 3

Enable wget download through proxy.

The /etc/wgetrc is the wget configuration file for all user that use the system (global wget configuration file). You may need root user privileges to edit this wget configuration file... To change single user configuration or to enable download using wget for single user on your system, make change to the $HOME/.wgetrc configuration file... 1. Log in on Linux Fedora 11 system. 2. Open Fedora 11 X Terminal if you using the Graphical Linux desktop. 3. To make sure that you can download using wget through proxy server, you need root user privileges to edit wget configuration file... use the su - command as example below to change to root user.

[fedora11@fedora11 root]$ su Password: <-- Key in root user password here and hit Enter key. [root@fedora11 ~]# 4. Open the wget configuration file wgetrc to locate on /etc directory. The example below show that we use the gedit editor to edit the wget configuration file wgetrc.

4. The figure below show the wgetrc configuration file open with gedit editor. Go through the configuration file until you find the part that say set default proxy for wget as show on the example below.

# You can set the default proxies for Wget to use for http and ftp. # They will override the value in the environment. #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 5. Edit the part on wgetrc configuration file as show on example above. Remove the comment tag (#) and then put the proxy server address and proxy server port number... and make sure that you remove comment tag and set use proxy to on (use_proxy=on)... as show on example below.

# You can set the default proxies for Wget to use for http and ftp. # They will override the value in the environment. http_proxy = http://172.16.160.119:8080/ <-- Remove comment tag (#) and put Proxy server address and Proxy port number ftp_proxy = http://172.16.160.119:8080/ <-- Remove comment tag (#) and put Proxy server address and Proxy port number # If you do not want to use proxy at all, set this to off. use_proxy = on <-- Remove comment tag (#) and make sure status is on 6. Test using wget to download something from internet... [root@fedora11 ~]# wget

http://prdownloads.sourceforge.net/webadmin/webmin-1.5101.noarch.rpm
--2010-03-11 04:27:30-http://prdownloads.sourceforge.net/webadmin/webmin-1.5101.noarch.rpm Connecting to 172.16.160.119:8080... connected. Proxy request sent, awaiting response... 302 Moved Temporarily Location: http://nchc.dl.sourceforge.net/project/webadmin/webmin/1.510/web min-1.510-1.noarch.rpm [following] --2010-03-11 04:27:32-http://nchc.dl.sourceforge.net/project/webadmin/webmin/1.510/web min-1.510-1.noarch.rpm Connecting to 172.16.160.119:8080... connected. Proxy request sent, awaiting response... 200 OK Length: 15995394 (15M) [application/octet-stream] Saving to: `webmin-1.510-1.noarch.rpm' 1% [ ] 205,536 10.7K/s eta 25m 2s

You might also like