Google Plus

How to Configure yum through Proxy ?

Written by M. Zinoune on . Posted in Frequently Asked Questions

Question: How to Configure yum through Proxy ?


 

Answer: If you are behind an http proxy server and you want yum to connect to the internet through that proxy open a terminal and type:

su -c 'gedit /etc/yum.conf

yum configuration

proxy=http://ip:port/

if you connecte with login and pass , should be

proxy=http://login:password@ip-host:port/

where ip is your proxy’s ip address and port is the port the proxy listens to. Don’t forget the / after the port number. Save and exit.

 [root@unixmen ~]# vi    /etc/bashrc 

and add a line

export proxy

save and exit

reboot your machine

 [root@unixmen ~]# yum   update

Loading “fastestmirror” plugin
Loading mirror speeds from cached hostfile
* epel: archive.linux.duke.edu
* pidgin: rpm.pidgin.im
* rpmforge: apt.sw.be
* livna: mirrors.tummy.com
* updates: ftp.ussg.iu.edu
* base: centos.aol.com
* addons: centos-distro.cavecreek.net
* freshrpms: ayo.ie.freshrpms.net
* centosplus: centos.cogentcloud.com
* extras: ftp.ussg.iu.edu
* adobe-linux-i386: linuxdownload.adobe.com
Setting up Update Process

For questions please refer to our Q/A forum at : http://ask.unixmen.com

  • Shahmat Dahlan

    Simply logout and log yourself in

    Or, if you have set the http_proxy or the ftp_proxy into either /etc/profile or ~/.profile or ~/.bash_proxy just

    . /etc/profile or
    . ~/.profile or
    . ~/.bash_proxy

    You DON’T have to reboot, seriously. You’re just changing environment variables.

  • Javid Prakash

    I have done all steps listed above but no change.I am new to fedora.Can’t able to download anything through terminal and same problem exists for Software update menu in System/Administration/Software update.But i am able to browse and download using web browser.I am using proxy server 10.1.1.2:3128 and 10.1.1.4:3128.Please guide me……….

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

Snake

|

Wow, great. That’s what i’m waiting for too. I want to make DC with LDAP ( Active Directory alternative) and SAMBA on Ubuntu. :-)

Blawer

|

Thanks!!!!!!!!!!!!!!!!!! you rules!!! all the other “help” in google are useless… yours was very helpful. Thanks again

piCool

|

Great ! we have another another master trick :-)

Yilmaz Ulugtekin

|

Just delete the space after the slash (/) it will work.

Pat L

|

I tried it and it works with a regular zip file, but if you password-protect the .zip file it does NOT work.

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .