Install in Specific Location

General support questions
Post Reply
manuel19
Posts: 5
Joined: 2015/05/18 13:07:18

Install in Specific Location

Post by manuel19 » 2015/05/18 13:16:57

Hi there,

I have installed Linux CentOS 6, I'm going to call this as Level1. So, that means, whenever I mention Level1 I mean the Operative System.
In Level1 I created the directory /opt/level2.

How can I make All the software install via; yum, rpm, tar ball, etc... Be installed inside Level2?

I mean, I want to use Level1 as the Operative System ONLY. As the Main Core. So, no applications will be installed in the default directories like /bin, /sbin, /var, etc...


I want to do that because In case I want to backup my server, I just need to Rsync the Level2 dir. (/opt/level2). Because that dir should have all my programs, all the things I installed, all configurations. etc...

How can I make all things be installed in /opt/level2 by default?


Thanks

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Install in Specific Location

Post by aks » 2015/05/18 16:21:44

I think you can do this via the --installroot option being passed to yum.

If you want to build a chrooted CentOS system, have a look at: http://zaufi.github.io/administration/2 ... os-chroot/

manuel19
Posts: 5
Joined: 2015/05/18 13:07:18

Re: Install in Specific Location

Post by manuel19 » 2015/05/18 18:33:58

Thanks aks,

I found something similar to you post.

Here is the link http://geek.co.il/2010/03/14/how-to-bui ... for-centos

But Thanks ;)

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Install in Specific Location

Post by TrevorH » 2015/05/18 19:37:35

I think you'd be much better served by making sure that you only install things from packages and then keep a list of the packages that you have installed. That makes it easy to recreate your installed apps. Backing up your data is another matter but changing the install path of everything to one below the install root seems like a very strange thing to do.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply