FreeBSD jails

From wikinotes
Revision as of 03:21, 31 August 2022 by Will (talk | contribs) (→‎Jail Management Tools)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Jails are a hardened version of chroots. They allow multiple separate FreeBSD installations to run on one machine, while sharing a kernel, ram, resources.

Documentation

man jail https://www.freebsd.org/cgi/man.cgi?query=jail&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
man jail.conf https://www.freebsd.org/cgi/man.cgi?query=jail.conf&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html

Tutorials

excellent/comprehensive tutorial http://clinta.github.io/freebsd-jails-the-hard-way/
FreeBSD Manual https://www.freebsd.org/doc/handbook/jails.html

Locations

/etc/rc.conf enable jails, global jail configuration
/etc/jail.conf configure individual jails
/etc/jails/*.fstab individual jail fstabs

Notes

jail usage
jail setup
jail maintenance
jail troubleshooting

Jail Management Tools

rctl set jail resource restrictions
cbsd abstraction layer over jails/bhyve/xen
iocage more powerful tool to facilitate managing jails
ezjail shellscript to facilitate managing jails