Centos How i build a chroot for Postfix/Mysql/Apache
I use Centos 5.4 on an Vserver.
Now i want try to make the mail-server(postfix/Dovecot/clamav/etc.) in an own Jail/chroot.
The Mysql in an own Jail/chroot, and apache with modsecurity in an own Jail/chroot.
I search with goole but i dont find the right answer.
How i build an chroot?
How i find out what files must be copy in the chroot?
After copy files in chroot can i deinstall the program than in main system?
there's an easy and a hard way.
it feels too much to explain the hard way (using ldd to build the most minimal chroot)
the easy way would be to use the --root option for rpm to install stuff into the to-be-chroot instead of the base system.
note that doesn't work using yum, that means the next little hurdle is that you'll have to manually add a lot of rpms to this chroot. start with the one callled "setup" and "filesystem" and also look for the utility "pkgorder" from anaconda-runtime.
Err yeah, and expect it to take a few days till you got it done.
- If I were you I'd go and try to use FreeBSD jails instead.
- CentOS 5.4 is horribly outdated.
edit: i wonder if there's a script to do all that, but i unfortunately don't know it. "rpmstrap" is the closest to this that I know of.
Check out my SSD guides for Samsung, HGST (Hitachi Global Storage) and Intel!