I am looking at setting up a shell script in order to properly document and automate the process I am using to setup a few servers we have. In order to test the shell script through its different stages I was thinking a CHROOT would be ideal, since I can wipe out the "virtual root" and create it on the fly. I have never used CHROOT before, however.

I was just curious what are the exact steps I would need to follow to implement this process of creating a chroot (with the basic core functions that would be needed to install apache/php/etc.)? and then destroying it?

link|improve this question

feedback

2 Answers

up vote 2 down vote accepted

The biggest problem is building a working environment under your chroot (all the dependencies and stuff).

I think searching online for Linux jail creation should help you get on track.

Tools like Jail Chroot Project or Jailkit should facilitate this process.

link|improve this answer
feedback

You may find a virtual server is better. You can checkpoint the state, then restore it at the end of your test. This environment would probably be a better proxy for a real server. KVM is easy to setup and build with.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.