How to Configure yum through Proxy ?

by
Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0Pinterest0StumbleUpon0Digg

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/

Share this Article: Facebook0Google+0Twitter0LinkedIn0Reddit0Pinterest0StumbleUpon0Digg