Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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