View Full Version : Configuring Yum For A Proxy

7th January 2005, 09:26 PM
Got yourself a shiny copy of Fedora Core 3? Want to update it to the latest packages available? Yet feel let down by Fedora's inability to change the settings for the proxy server system wide via the "Preferences -> Network Proxy" dialogue? Then step inside...

First of all get your network proxy settings to hand. And keep them somewhere where you can see them. Then load up your favourite terminal of choice and execute:
su -
cd /etc
cp wgetrc wgetrc.backup
gedit wgetrc &This will load up a config file for Wget after making a backup copy of it. Search through the config file until you find the area:
# 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
Now edit this section to insert your proxy information. Remembering to remove the '#' signs infront of http_proxy, ftp_proxy and use_proxy. It should now look something like this:
# 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://wwwcache.nottingham.ac.uk:3128/
ftp_proxy = http://wwwcache.nottingham.ac.uk:3128/

# If you do not want to use proxy at all, set this to off.
use_proxy = onWith that done save the file and then close gedit, and execute the following on the command line:
gedit /root/.bash_profile &At the bottom of the config file insert the following, where "yourproxyaddress:portnumber" is your proxy server information.
export http_proxySave the file and close gedit. Whilst we're at it we may as well edit your user profile to incorprate the proxy settings. From the command line execute:
gedit /home/<username>/.bashrc_profile &Then simlpy insert the same details as you did for root. Save the file and then close gedit. Yum should now be configured for your proxy server. To test simply use Yum as you normally would, for instance updating the system:
yum update If you are unsure about how to use yum check out the FedoraFAQ (http://www.fedorafaq.org) and read the help provided with yum. This help can be accessed by issuing the following command in the terminal:
yum helpI hope that helps some folks!

23rd January 2005, 12:11 PM
This (http://www.fedoraforum.org/forum/showthread.php?t=31120) is related.

3rd February 2005, 12:51 PM
unfortunately the above pointeres didnt work for me (yum just hung for a infinate time, whether its to do with how the proxy is set up i dont know, but to access the internet through the proxy so yum would work,

i had to edit only /etc/profile

adding the lines at the bottom

export http_proxy=http://username:password@wwwcache.bangor.ac.uk:8080
export ftp_proxy=http://username:password@wwwcache.bangor.ac.uk:8080
export gopher_proxy=http://username:password@wwwcache.bangor.ac.uk:8080

works perfectly now, let me know if this helps, im a linux newbie!

13th February 2009, 05:59 PM
on typing the below mentioned command
gedit /home/<username>/.bashrc_profile &

i get the following result
[1] 4897
[root@localhost ~]# bash: username: No such file or directory

[1]+ Exit 1 gedit /home/ < username > /.bashrc_profile

could you plz help me out with it..

21st April 2009, 09:52 AM
Dear vismay,
You have taken this syntax wronf. Here < username > is your linux user name for example if your logon user name is vismay then the syntax will be :

gedit /home/vismay/.bashrc_profile &

I hope I have made you clear.

All the best..