Pages

Friday, June 4, 2010

Setup the Proxy Server for apt-get in Linux

        Open a new root terminal and run the next command from $HOME folder:

gedit .bashrc

        This will open the /etc/bash.bashrc file for editing. Add the following lines to the end of this file:
export http_proxy=http://user:password@my.proxy.server:port/
export ftp_proxy=http://user:password@my.proxy.server:port/
        If you have no authentication on the proxy server, include only the server and port:
export http_proxy=http://cache.proxy.server:port/
export ftp_proxy=
http://cache.proxy.server:port/
 
        Finally,  run the source command:

source .bashrc 

        Now you should be able to run apt-get from the command line.

0 comments:

Post a Comment