Linux‎ > ‎

YUM behind proxy server

19th March 2009

Have you ever faced situations like you need to install or update some packages using YUM , but you are behind a proxy server!

There is good news , you can do this through proxy server, I have tested this on CentOS.

Edit your .bashrc file ,normally .bashrc file is located under /root folder and write the following function in that file



function proxy(){
export http_proxy="http://username:password@A.B.C.D:xxxx"
export ftp_proxy="http://username:password@A.B.C.D:xxxx"
}

Where A.B.C.D is the IP address of your proxy server and xxxx is the port number it is using.Once you are done editing the .bashrc file, save it and logoff from the console and login again. Logoff & login is required to activate the function and type proxy on command linf and press enter.
#proxy

Here you go,now you should be able to use YUM.








Comments