Managing Jails

2009-05-13 15:16:07来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


General Information
This document is an introduction to basic
[url=javascript:;]FreeBSD[/url]
jails also called ‘fat jails’. We discuss an easy
[url=javascript:;]jail[/url]
installation process. We will do some basic jail configuration and show you how to manage the jail environment. This document wil not cover building ‘chroot jails’ in a jail.
Requirements
Basic knowledge of FreeBSD
[url=javascript:;]Root[/url]
access
Read up on jails – see the references at the end of the document
Installation
Before we start: the machine which will run the jails is refered as ‘host’.  The jails are built and configured from the host. Every individual jail runs the desired services. The host’s services are minimized, running a syslogd and sshd should be enough.
Jail Location
Determine where you want to install the jail(s). Throughout the document /usr/jails will be used. For example we will install a web server in the jail, so let us take /usr/jails/webserver1 as the location for the web server.
cd /usr/
mkdir jails
cd jails
mkdir webserver1
sysinstall
In the menu select ‘Custom’.
Choose ‘2 Options’ and navigate to ‘Install Root /’. When selected, press spacebar and change ‘/’ to ‘/usr/jails/webserver1’. Press ‘q’ to quit the options menu.
Go to ‘5 Distributions’ and select ‘A Minimal’.
Then choose ‘6 Media’ from which you will install your base installation for the jail.
When done, select ‘7 Commit’.
Don’t visit the general configuration menu. Every option you edit in the configuration menu will be executed on your host. Exit the installation menu and return to your host's
[url=javascript:;]shell[/url]
.
# cd /usr/jails/webserver1
# ls
.cshrc           boot          libexec        rescue         tmp
.profile         dev           media          root           usr
COPYRIGHT        etc           mnt            sbin           var
bin              lib           proc           sys
#

We have to edit and create some configuration files in order to make our jail(s) work.
Host – rc.conf
hostname="host"
ifconfig_rl0="inet 10.0.0.10 netmask 255.255.255.0"

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:warning: do not list domain in BOTH mydestination

下一篇:Creating a FreeBSD Jail