Tuesday, April 14, 2009

Proxy settings for accessing internet for installing packages in Ubuntu and Fedora

Recently, college network administrators asked us to use student's email for accessing internet, with proxy server. Many of the students faced a lot problems since many softwares don't ask for username/password for connecting to internet.
Some of the students sent a mail to others that how to set username/password to connect to internet in Fedora Core linux and Ubuntu Linux. Some solutions for these.
1) Fedora core linux -->
follow these instructions.

-->open .bashrc file using Terminal/gedit or any text editor.
--> write these lines at the end of file.
--> export HTTP_PROXY=username:password@proxy-servers-ip-address:port
--> export FTP_PROXY=username:password@proxy-servers-ip-address:port
That's it. Save the file. Now you can connect to internet using your email address and your password.

2) For Ubuntu : Its just simple.
Open Main Menu->System->Administration->Synaptic Package Manager->Preferences->Network Settings->Authentication.
Now set the username and password. Now you can connect to internet.

If you are not using Synaptic, then manually create file called apt.conf in /etc/apt/apt.conf. Now add these two lines to that file.
--> Acquire::http::Proxy "http://username:password@proxy:port";
--> Acquire::ftp::Proxy "ftp://username:password@proxy:port";
Now run this command -- > sudo apt-get update . Now things will go easy. The above method for fedora will also work for Ubuntu also.


Njoy
Purush

No comments:

Post a Comment