LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-21-2009, 04:30 AM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Rep: Reputation: 51
YUM through proxy?


I am using RHEL 4 Update 6 with yum behind firewall. Tried making it through proxy but donno how to go for the same.
Which file I need to edit?
 
Old 04-21-2009, 04:40 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
please scroll down to the bottom of this page for many identical questions.
 
Old 04-21-2009, 04:41 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
You have to edit the [main] section in /etc/yum.conf. From man yum.conf
Code:
proxy  url to the proxy server that yum should use.

proxy_username
       username to use for proxy

proxy_password
       password for this proxy
 
Old 04-21-2009, 05:15 AM   #4
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Original Poster
Rep: Reputation: 51
I tried editing yum.conf as:
Code:
http_proxy=http://kp-roxy:3128
http_proxy_username=yourshadow
http_proxy_password=<passwd>
http_proxy_domain=ULTRAINFRA
But it says:
Code:
root@localhost ~]# yum install update
Loading "installonlyn" plugin
Setting up Install Process
Parsing package install arguments
Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-7&arch=i386 error was
[Errno 14] HTTP Error 407: Date: Tue, 21 Apr 2009 10:13:31 GMT
Content-Length: 257
Content-Type: text/html
Server: NetCache appliance (NetApp/6.0.2P2D2)
Connection: close
Proxy-Authenticate: Negotiate
Proxy-Authenticate: NTLM
Proxy-Authenticate: Basic realm="ultrainfra"

Error: Cannot open/read repomd.xml file for repository: fedora
 
Old 04-21-2009, 05:31 AM   #5
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Rep: Reputation: 38
Hi..

I am also behind a proxy server.. The only thing I did was editing
Code:
[root@Wazirkutz ~]# vim .bashrc
# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
Code:
export http_proxy=http://192.168.10.1:8080
export ftp_proxy=http://192.168.10.1:8080
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi





### i think that it..

Cheers!!
 
Old 04-21-2009, 05:34 AM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
It looks like you are trying to use a Fedora 7 repo on RHEL4. That will not work. You need to use a repo that provides packages for RHEL4. Take a look at Centos. Centos is RHEL with the logos removed, except it is free to download/update(unlike RHEL). Its web page will also provide a list of compatible third party repos.
 
Old 04-21-2009, 06:09 AM   #7
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Sory thats Fedora 7 not RHEL..
I am sorry for mentioning wrong at the start of thread
 
Old 04-21-2009, 06:17 AM   #8
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Still I am facing same error:
All I tried running:
# set "http://yourshadow:3128/"
# export proxy_http="http://yourshadow:3128"


But It dint worked !!!
Code:
Loading "installonlyn" plugin
Setting up Install Process
Parsing package install arguments
Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-7&arch=i386 error was
[Errno 14] HTTP Error 407: Date: Tue, 21 Apr 2009 11:14:38 GMT
Content-Length: 257
Content-Type: text/html
Server: NetCache appliance (NetApp/6.0.2P2D2)
Connection: close
Proxy-Authenticate: Negotiate
Proxy-Authenticate: NTLM
Proxy-Authenticate: Basic realm="ultrainfra"

Error: Cannot open/read repomd.xml file for repository: fedora
Does it complain of any file missing?
I am able to ping to the mirror.fedoraproject.org

Last edited by your_shadow03; 04-21-2009 at 06:19 AM.
 
Old 04-21-2009, 06:57 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
HTTP Error 407 means "Proxy authentication required" so you have to pass username and password in the correct way. According to the man page of yum.conf you have to add
Code:
proxy=http://url:port
proxy_username=username
proxy_password=password
Be sure to put the correct username and password related to your account on the proxy server. It should work.

In alternative (don't mix different settings) you can try
Code:
export http_proxy=http://username:password@url:port
export ftp_proxy=ftp://username:password@url:port
in /root/.bashrc
 
Old 04-21-2009, 10:59 PM   #10
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Original Poster
Rep: Reputation: 51
I tried the above entry under /etc/yum.conf but it says:
Code:
[root@localhost ~]# yum install git
Loading "installonlyn" plugin
Setting up Install Process
Parsing package install arguments
Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-7&arch=i386 error was
[Errno 4] IOError: <urlopen error nonnumeric port: '3128?'>
Error: Cannot open/read repomd.xml file for repository: fedora
[root@localhost ~]#
[root@localhost ~]#
 
Old 04-22-2009, 12:32 AM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
It seems you mis-configured proxy or proxy port.

Code:
proxy=http://proxyserver:proxyport
proxy_username=username
proxy_password=password
 
Old 04-22-2009, 12:48 AM   #12
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Hello Chaitanya,
I did the entry correct as:
Code:
proxy=http://<IP ADRESS>:3128
proxy_username=username
proxy_password=password
Why its not working!! STCUKED !!!

I added http_proxy to each entry and this time it says:
Code:
[root@localhost ~]# yum install git
Loading "installonlyn" plugin
Setting up Install Process
Parsing package install arguments
Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-7&arch=i386 error was
[Errno 14] HTTP Error 407: Date: Wed, 22 Apr 2009 05:50:18 GMT
Content-Length: 257
Content-Type: text/html
Server: NetCache appliance (NetApp/6.0.2P2D2)
Connection: close
Proxy-Authenticate: Negotiate
Proxy-Authenticate: NTLM
Proxy-Authenticate: Basic realm="ultrainfra"

Error: Cannot open/read repomd.xml file for repository: fedora
Does that mean DOMAINNAME has to be mentioned.
Let me tell you whenever I put the proxy server entry under Windows Tools > Internet Options > Advanced > Network > settings > and I enter the proxy name and port it ask me for DOMAIN too.
I think it is asking for right domain.
What shoudl be entry for mentioning DOMAIN NAME.

Last edited by your_shadow03; 04-22-2009 at 12:54 AM.
 
Old 04-22-2009, 01:43 AM   #13
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
If you are using ip address then domain name should not be the issue. Is your proxy server running Windows? Or is it running ISA?
 
Old 04-22-2009, 01:59 AM   #14
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,462
Blog Entries: 6

Original Poster
Rep: Reputation: 51
Proxy Server is remote UK Machine which is On Windows.If I use hostname then what entry should be made.
Generally I use hostname of machine on Windows while trying to connect.I pinged the machine successfully and got IP from there. I put it instead of hostname.
Why its says:
Code:
Proxy-Authenticate: Basic realm="ultrainfra"
Is it error? or just info.
I doubt too for
Code:
Error: Cannot open/read repomd.xml file for repository: fedora
Does that mean anything missing?

Last edited by your_shadow03; 04-22-2009 at 02:02 AM.
 
Old 04-22-2009, 02:08 AM   #15
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Yeah I guess because the proxy server is running windows you will need NTLM authentication.
I am not sure if the authentication method used for proxy running Linux will be applicable for those running windows.
This link could be useful.
http://www.geocities.com/rozmanov/ntlm/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum proxy brusel Red Hat 3 06-04-2008 10:02 AM
YUM with proxy watcher69b Linux - Software 5 04-22-2008 07:08 AM
yum proxy problem Inquisitive Alex Fedora 5 04-12-2007 08:32 AM
yum thru proxy a1ex_007 Fedora 7 06-29-2005 10:30 AM
Proxy + Yum beatlelane Fedora 9 12-17-2003 08:25 AM


All times are GMT -5. The time now is 03:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration