Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: friskydrifter on January 16, 2008, 06:27:42 AM

Title: Yum through authenticating proxy
Post by: friskydrifter on January 16, 2008, 06:27:42 AM
Hi guys. I was wondering if there is a way to setup yum to use an authenticating proxy with the config setprop commands?

I can get yum to work via CLI if I export http_proxy but I was hoping that I could set it up so it could be driven from the server-manager page.
I can also get it to work if I edit /etc/yum.conf but as you know that gets re-written by other things and so is not permanent.

ClamAV and other things were ok but I cant find anything for yum.

It would be even better if I could set a system wide proxy authentication setting so I dont have to configure each app?

I have looked in the manual and had a look at http://wiki.contribs.org/DB_Variables_Configuration (http://wiki.contribs.org/DB_Variables_Configuration)
but no luck.

Cheers
Title: Re: Yum through authenticating proxy
Post by: cactus on January 16, 2008, 07:41:20 AM
I can get yum to work via CLI if I export http_proxy but I was hoping that I could set it up so it could be driven from the server-manager page.
I can also get it to work if I edit /etc/yum.conf but as you know that gets re-written by other things and so is not permanent.
Make the changes to the template sections of the yum.conf file, that would make your change stick, and would probably make it possible to run it from the server-manager as well. For more inform on the template system have a look at the SME Server Development Guide linked in the wiki.

Perhaps it is worth reporting this as a New Feature Request as well in the bugtracker, since you perhaps already have a fix for this it might get implemented.
Title: Re: Yum through authenticating proxy
Post by: friskydrifter on January 17, 2008, 12:14:47 AM
OK this is what I did.

I would like it as a new feature with the setprop commands, I'd put it in as a new feature request but im relatively new to this and don't know where.

Anyway,

Navagate to:

/etc/e-smith/templates/etc/yum.conf

Create three files in the directory

touch 10main_proxy
touch 10main_proxy_username
touch 10main_proxy_password

If they are not setup properly you need to change the permissions for each file. I will show you with the first file, you need to do the same to the other two

chgrp root 10main_proxy
chown root 10main_proxy
chmod 644 10main_proxy

Ok now you have your files there and they are setup properly you need to put data in them.

For 10main_ proxy you need to add:
proxy=http://proxy_ipaddress:port_number/       (it is important to add the last / or it wont work)

For 10main_proxy_username add:
proxy_username=[username]

For 10main_proxy_password add:
proxy_password=[password]

make sure you saved the file then when back in the CLI type:

expand-template /etc/yum.conf

then

signal-event yum-modify


This should now work


Cheers
Title: Re: Yum through authenticating proxy
Post by: stephen noble on January 17, 2008, 02:12:20 AM
I'd put it in as a new feature request but im relatively new to this and don't know where.

go to Bugs, link at top of page
in the search box type yum proxy

two look relevant

It would be helpful if you could add you 2c to bug 2407