Yum Install To A Portable Location

Home » CentOS » Yum Install To A Portable Location
CentOS 4 Comments

I have googled, read the man page, and such.

What I am trying to do is install applications to a NFS mounted drive, where the libraries and everything are locally installed on that filesystem so that it is portable across servers (I have over 100
servers which each need specific applications installed via yum and we do not want to install 100 copies).

We tried the yum relocate and it was not available on CentOS6.4

and yum –nogpgcheck localinstall R-3.1.0-5.el6.x86_64

I want the binaries and all dependencies in the application filesystem which is remote mounted on all servers.

Thanks,

4 thoughts on - Yum Install To A Portable Location

  • I don’t think there is a generic way of doing this since yum can pretty much install anything anywhere and run the postinstall scripts that might only work on the host where it runs. However, for typical things it might work to install everything on one host where / is exported and mounted somewhere on the other systems with PATH and LD_LIBRARY_PATH tweaked to visit the bin,sbin,usr/sbin,usr/bin and equivalent library paths on the mountpoint after the local locations.
    Things like perl modules will probably become a horrible mess, though, and other things might need a splattering of symlinks to work.

    Might be easier to PXE boot into an NFS-mounted root with DRBL or the like if you need to save disk space. On the other hand, it’s really not that hard to tell yum on 100 machines to install the package.

  • What will chroot get me. I have root on the server, I have a filesystem mounted on all server.

    What I want to do is contain the binaries and dependancies on the nfs filesystem

  • Hi Dan,

    Chroot gets you a space that “looks” like it is a separate system. Given this is R, I assume you are probably wanting this for HPC like purposes… Could I suggest building your own version of R and installing into a nfs area? You may also wish to investigate the facilities provided by the package environment-modules – they can be quite handy (these aren’t environmental monitoring).

    My R users tend to need the later versions of R. I configure R with something like:
    ./configure –prefix=/nfs_apps –enable-R-shlib –with-x –with-tcltk

    Regards Robert