Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Using Yum to install packages for my user only

Writer Andrew Mclaughlin

I would like to be able to install packages by using a package manager (Yum is available on my server), but I don't have root access. I don't technically need root access, I just want the packages to be installed in my home directory.

Is there any way I can do this?

2 Answers

As Ignacio points out, you can use yumdownloader.

But for the second step

rpm -ivh --relocate /usr=/home/username/usr --relocate /etc=/home/username/etc

or

rpm -ivh --relocate /=/home/username/progname

is probably easier.

If the RPM has any scripts that assume they are running as root, you might also need to add the --noscripts option.

Plus you can add the --aid option to resolve dependencies.

Yet another useful options in this case is --root to avoid rpm to write to /var path (since you're not root), so the command will be something like:

rpm -ivh --relocate /=/home/username/progname --root /home/username/progname
2

Not using yum. You can use yumdownloader though, and then put the packages through rpm2cpio ... | cpio -id in order to extract their contents, and then place the files in the appropriate locations.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy