Admin Life Errors, Fixes, and Encounters


ezjail / jail setup on freebsd 9.3

# cd /usr/ports/sysutils/ezjail
# make install clean

create a base jail

# ezjail-admin install -sp

update the basejail with freebsd-update
# ezjail-admin update -u

update the base jail's ports tree

# ezjail-admin update -P

rc.conf entry ensures our jail will be started at boot and gets the IP it needs.
# ifconfig em0 alias netmask 0xffffff00 broadcast
# echo 'ifconfig_em0_alias0="inet netmask 0xffffff00 broadcast"' >> /etc/rc.conf
# echo 'ezjail_enable="YES"' >> /etc/rc.conf

Create the jail
# ezjail-admin create
# cp /etc/resolv.conf /usr/jails/
# service ezjail start
to see running jail
# jls

to get console access to the jail
# ezjail-admin console
to stop a jail
# ezjail-admin stop

to archive for you to copy a jail
# ezjail-admin archive

The archived file should appear in /usr/jails/ezjail_archives. you can then duplicate it as many times as you want. If you install ports, don't bother copying the jail to another machine, there will be missing libraries...
# ezjail-admin create -a /usr/jails/ezjail_archives/
# ezjail-admin start
Filed under: Errors Comments Off
Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.