English
Ask Your Question
1

Proxy Internet & Terminal

asked 2012-01-03 15:27:02 +0000

Chetan Patil gravatar image

I have my netconnection via proxy with username and password.

I am able to browse using browser however not able to use internet via terminal for yum,wget etc.

Prosy settings is like : pqr.abc.def.ghi:80

Any solution?

edit retag flag offensive close delete

4 Answers

Sort by » oldest newest most voted
4

answered 2012-01-03 15:58:28 +0000

hhlp gravatar image

updated 2012-01-04 17:11:08 +0000

for WGET

editing sudo vim /etc/wgetrc and edited the following:

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
#https_proxy = http://proxy.yoyodyne.com:18023/
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/

# If you do not want to use proxy at all, set this to off.
#use_proxy = on

You need to remove the comment (#) at the beginning of the last 4 lines shown here.

for YUM

we are going to configure YUM software to use proxy to get LINUX updated with new softwares all the times with repositories available on internet.

1) Configure yum.conf

sudo vim /etc/yum.conf

enter following lines at bottom of [main] section

proxy=http://yourproxyaddress:port/
proxy_username=youruser
proxy_password=yourpassword

2) Open a Terminal and Export http_proxy variable

export http_proxy=”http://yourproxyaddress:port/”
export ftp_proxy=”http://yourproxyaddress:port/”

3) Export http_proxy variable in bash login script

gedit /home/<username>/.bashrc_profile &

export http_proxy=”http://yourproxyaddress:port/”
export ftp_proxy=”http://yourproxyaddress:port/”

This will help you to export http_proxy variable automatically everytime you login.

Now use “yum list” command to check for its working.

yum list

Documentation

man yum.conf

edit flag offensive delete publish link more

Comments

Getting following error for yum list : "Couldn't resolve proxy"

Chetan Patil ( 2012-01-04 15:49:07 +0000 )edit
3

answered 2012-01-04 18:09:49 +0000

asto gravatar image

If you want to do everything through a proxy, rather than setup proxies for individual software packages, I would recommend changing the global settings. Open up "gnome-control-center" from the terminal, go to network settings and edit the proxy configuration there.

edit flag offensive delete publish link more

Comments

I tested both method in a virtual machine with an free proxy server port 80 and both method work perfectly of course @asto method is the esiest...

hhlp ( 2012-01-04 19:04:15 +0000 )edit

there is no system proxy settings in gui network in fedora 17 now.

yanglifu90 ( 2012-06-05 17:40:05 +0000 )edit

@yanglifu90 There is in KDE. Go to system settings -> Network settings. I am not sure of Gnome, I have stopped using it.

asto ( 2012-07-02 11:38:30 +0000 )edit
0

answered 2012-03-23 03:03:08 +0000

RDKcodes gravatar image

I have no proxy for my network. I set the network settings to automatic.

Now what do I export http_proxy= to?

As, I have no proxy, it should probably be http_proxy="No Proxy"(something like that).

The CPAN should also be configured using o conf, what should I set the network to here ?

edit flag offensive delete publish link more

Comments

If you don't have any proxy set up and you connect automatically via LAN or Wifi then you don't need to edit anything.

Chetan Patil ( 2012-03-23 09:22:01 +0000 )edit

Thanks man :)

RDKcodes ( 2012-03-25 12:05:06 +0000 )edit
0

answered 2012-01-03 15:52:38 +0000

Check the link below if that helps -

Yum under proxy

edit flag offensive delete publish link more

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

Add answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers to your questions.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question tools

Follow
2 followers

Stats

Asked: 2012-01-03 15:27:02 +0000

Seen: 11,942 times

Last updated: Mar 23 '12