Simple chroot environment on CentOS/RHEL with yum

Let’s create simple chroot in CentOS environment :

Ok, than we need to create RPM database to have ability to install our rpm packages:

It’s quite comfortable to manage all our rpm packages by YUM, so we need to install centos/rhel-release rpm package:

We are ready to check it by switching to chroot:

Here is small custom init.d script to start and stop chroot environment daemons (for example nginx/php-fpm):

Download link:

Author: GergunD

Leave a Reply