Adding rpms to virtual sites
crankycronos posted this on Dec 26th 2006 at 4:08 am under Ensim Fixes
Although Ensim provides for a means of adding rpms to virtual sites when being created, maintaining them after the virtual domain has been created is quite the pain. Every update is almost guaranteed to overwrite those mods. These 3 small little scripts will make your life a whole lot easier.
addpkg (usage: addpkg domain package)
lspkg (usage: lspkg domain)
rmpkg (usage: rmpkg domain package)
As root login via SSH:
wget http://customensimbackup.com/download/ensimpkg.tar.gz tar -zxvf ensimpkg.tar.gz ./install.sh
Great work Rene. Thanks.

Melinda on 17 Mar 2007 at 10:59 am #
Hi,
I can’t find the documention for above that is listed in the README file.
Thanks
Melinda
crankycronos on 17 Mar 2007 at 11:05 am #
What about the README file is confusing you?
technostruct on 11 Jul 2007 at 12:43 pm #
Well, for starters, that site doesn’t come up at all. I can’t reach it myself
http://ensim.webscorpion.com
I’d love to see how to use this great, useful tool.
crankycronos on 11 Jul 2007 at 2:26 pm #
I included the directions for usage.
addpkg (usage: addpkg domain package)
lspkg (usage: lspkg domain)
rmpkg (usage: rmpkg domain package)
Mark Steel on 11 Jul 2007 at 2:35 pm #
Yeah, but some people don’t understand what they’re for … and as mentioned, the README file for documentation links to a site that hasn’t existed in at least two (if not three) years?
addpkg somedomain.tld php-pear
— adds php-pear to somedomain.tld
rmpkg somedomain.tld php-pear
— removes php from somedomain.tld
lspkg somedomain.tld
— shows what packages have been installed into somedomain.tld
technostruct on 17 Jul 2007 at 4:02 pm #
I guess the problem i have is that I can’t tell how we’re adding RPMs. Specifically, do I need to profide an HTTP or FTP link to said RPM, or what? In all these examples, I don’t see anything beyond a simple name. I’m sometimes a bit think about this, so it’d be helpful to get a hint.
crankycronos on 17 Jul 2007 at 4:09 pm #
You do need to know the following:
1. The domain name that you desire to add the RPM into
2. The name of the RPM
For instance, I want to add the php-gd into pigglypokes.com because he has to use php-gallery to show off his latest pigglet litter.
I would use “addpkg pigglypokes.com php-gd”
Thats it. It does the rest.
technostruct on 17 Jul 2007 at 4:34 pm #
But does the RPM you want to install have to already be installed on the host machine, or does it use something like “yum” or “up2date” to pull the RPMs?
I ask because I have specific PEAR-based items that I need installed per-site, and I don’t have them on the host server:
PEAR::Net_Socket
PEAR::Auth_SASL
PEAR::Net_IMAP
PEAR::Net_Sieve
PEAR::HTTP_WebDAV_Server
crankycronos on 17 Jul 2007 at 4:42 pm #
It already has to be installed.
Now if a site needs to have something more in specifics they can install other stuff in high security mode. Just make sure they have development and ssh, etc all active for the domain. In 3.1 compatible mode, then it will use the server’s rpms. In the case of pear,
pear install xxxxxxxx
I would make the site in 3.1 compat mode. Don’t want folks installing strange things ….
You do know that I have a server admin and update service where I pretty much handle stupid stuff like this? right? It’ only $50 a month.
technostruct on 17 Jul 2007 at 7:51 pm #
I don’t see why letting the users have access to the entire site, which I believe includes installing to local directory, would be better. Am I missing something here? Isn’t that what 3.1 does?
I’ve gotten those “pear” installed to the local directory. However, the “addpkg” directive doesn’t work. Nor does the “pear install _____” one:
-bash-3.1$ pear install Net_Socket
WARNING: channel “pear.php.net” has updated its protocols, use “channel-update pear.php.net” to update
Cannot install, php_dir for channel “pear.php.net” is not writeable by the current user
-bash-3.1$
So now I’m lost. And I promise, if you’d let me PM you, I wouldn’t put it all here
crankycronos on 17 Jul 2007 at 8:16 pm #
php-pear is just the basics and thats it.
The rest of the pear packages that any site admin might need is strictly to be done by them, and its pear install xxx
http://pear.php.net/ for more info.
mta on 01 Aug 2007 at 2:35 pm #
nice.
tmib on 21 Nov 2007 at 5:15 am #
Thanks man, awesome stuff!
Suresh on 21 Mar 2008 at 12:55 am #
Cool stuff
sinupeter on 21 Jul 2008 at 1:12 pm #
Hi guys – This works great for php-gd library for example but is there a way by which anyone can tell me if I can install Joomla as a Power tool on Server and then addpkg to vistual sites ?
crankycronos on 21 Jul 2008 at 1:46 pm #
There is no Joomla Power tool that I know of. You can always script out the addpkg “utility” in order to add php-gd or any other rpm that you desire.
sinupeter on 12 Aug 2008 at 8:53 am #
Can you tell me how I can install joomla as a rpm on server and use the addpkg utility for site installations ?
crankycronos on 12 Aug 2008 at 9:38 am #
You would need to do the following:
1. Create the overall rpm with replaceable values so that when those values are replaced it would “appear” to be installed.
2. You would need some sort of wrapper script to replace the values once the rpm was installed.
I would not suggest doing the install with the method you are thinking about. I would suggest a script of some sort that does all that in one shot.