[lug] Private yum install tree?
anichols at trumped.org
Fri Dec 28 21:37:47 MST 2012
On Fri, Dec 28, 2012 at 2:43 PM, Steve Sullivan <sullivan at mathcom.com>wrote:
> I need to install software for my use on CentOS 6.3, but I do NOT
> have root access. Of course I can use ./configure, make, and
> make install. But it would be so much easier if I could use yum,
> or some other package manager.
> Is there a way to have yum use a private repository,
> and install to a private directory tree?
Two separate problems - but related. Here's my $.02
1) For yum to use a private repository, try building your own yum
configuration and use the -c argument. You could host the yum repository on
s3 or even on the local filesystem, but yum will only look at the
repositories in your config (as far as I can tell). The problem you're
going to have though, if you aren't root, is that you can't write to the
RPM database - so it's doubtful yum or rpm will work for you. I'm not aware
of a way around that.
2) Building RPM's that install into a custom directory. Take a look at fpm
(https://github.com/jordansissel/fpm). This makes it pretty trivial to
package up software you've placed in some directory and then re-install it
wherever you want. The documentation could be better IMO, but it goes
something like this:
- I want to install into my home directory, /home/anichols/foo
- I download my source, ./configure, make
- When I want to install it, I make install DESTDIR=/home/anichols/foo
- Then I package it with fpm: fpm -n foo -s dir -t rpm -v 0.0.1 --iteration
1 -C / /home/anichols/foo
That's just a simple example - fpm has a boatload of options but at the end
of the day it removes a lot of the complexity of building rpm's. It doesn't
work 100% of the time, but Jordan is pretty helpful if you reach out. There
are also lots of fpm cookbooks out there which have used makefiles & ruby
(fpm-cookery) to build a framework around making this even easier. Just
search for fpm on github and poke around.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LUG