LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   how to set proxy for rpm and yum (https://www.linuxquestions.org/questions/fedora-35/how-to-set-proxy-for-rpm-and-yum-502609/)

sammy11 11-17-2006 04:14 PM

how to set proxy for rpm and yum
 
I am trying to follow the "fedorafaq.org" instruction to set up yum. I was able to set proxy for wget through /etc/wgetrc and did
"wget http://www.fedorafaq.org/samples/yum.conf". It went well.
When I try
rpm -Uvh http://www.fedorafaq.org/yum http://rpm.livna.org/livna-release-5.rpm
PHP Code:

I got this error message
Retrieving http://www.fedorafaq.org/yum
errorskipping http://www.fedorafaq.org/yum - transfer failed - Unknown or unexpected error
Retrieving http://rpm.livna.org/livna-release-5.rpm
errorskipping http://rpm.livna.org/livna-release-5.rpm - transfer failed - Unknown or unexpected error
rpmurl.c:103XurlFreeAssertion `u && u->magic == 0xd00b1ed0' failed.
Aborted 

It probably the proxy issue. How do set it up?
I did try downloading "yum" and "livina-release-5.rpm" and issued
"rpm yum livina-release-5.rpm" (is this the same thing as using "rpm http://..."?). It went well, but yum still does not work. I did put proxy, proxy_username, proxy_password in yum.conf. Does the location matter in that file?
Here is part of the error message when I issue "yum list available"

PHP Code:

Loading "installonlyn" plugin
Setting up repositories
livna                                                                
[1/7]
http://rpm.livna.org/fedora/5/x86_64/repodata/repomd.xml: [Errno 4] IOError: <urlopen error nonnumeric port: '8080?'>
Trying other mirror


apsivam 11-18-2006 09:23 AM

execute the following command
Code:

# export http_proxy=http://you_proxy_server:port

Simon Bridge 11-19-2006 12:34 AM

From the Unofficial Fedora FAQ:

For more info about yum, see the yum project page. (Thanks to Ron Kuris for this tip.)

To get yum through a proxy, see the Fedora documentation about yum and proxies.

BTW: if you just want to display a code box rather than the colorful php-code box, just use "code" in square brackets.

sammy11 11-22-2006 08:29 PM

Thanks,
Now I got it work by setting: export http_proxy=http://username:password@proxyserver:8080/.
It seems the only way. I tried setting proxy in GNOME, in yum.conf, and creating script file setting http_proxy. They all didn't work. Why this scrip does not work?
Quote:

http_proxy=http://username:password@proxyserver:8080/
export http_proxy
It seems perfectly the same as the above command line.
Anybody bother to tell me why?

apsivam 11-29-2006 02:10 AM

Quote:

Originally Posted by sammy11
Thanks,
Now I got it work by setting: export http_proxy=http://username:password@proxyserver:8080/.
It seems the only way. I tried setting proxy in GNOME, in yum.conf, and creating script file setting http_proxy. They all didn't work. Why this scrip does not work?

It seems perfectly the same as the above command line.
Anybody bother to tell me why?

How do you execute the script if it is ./script_name it won't work you have to do "source script_name"


All times are GMT -5. The time now is 03:26 PM.