12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

System Configuration—JailsThis command will start the jail named webserver1. In order to start all the jails thatare specified in /etc/rc.conf, you should run the following command:# /etc/rc.d/jail startThis command will start all the jails.Note that all the jails you specified in /etc/rc.conf will be automatically started atsystem boot up.Shutting Down JailsThe typical system commands that you use, to shutdown or reboot the system—shutdown(8), halt(8), and reboot(8) are not jail-friendly and cannot be used frominside a jail. In fact, shutting down or rebooting the jail cannot be done from insidethe jail and should be done by the system administrator on the host system. The bestway to stop a jail is to use jail rc script:# /etc/rc.d/jail stop webserver1This command will stop (or shutdown) the jail named webserver1.To restart a jail, you can invoke the jail rc script with the restart argument asshown here:# /etc/rc.d/jail restart webserver1Running the /etc/rc.shutdown rc script from inside the jail maysimulate a system shutdown. This should be used as the last resortto restrain access, to stop the jail from the host system. However, thismay lead to leaving some jailed processes running. Also, this is not atechnically clean method to shutdown a jail.Managing JailsIn addition to the standard utilities that you use to control the processes (ps, kill,and so on), there are two more utilities available for jails.The jls(8) utility displays a list of currently running jails. This is shown as thefollowing command:# jlsJID IP Address Hostname Path1 10.0.0.2 webserver1 /usr/jails/webserver1[ 82 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!