1

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?

2

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.

1

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.

Your Answer

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

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