freebsd 10 create jail

Ответить
admin
Администратор
Сообщения: 198
Зарегистрирован: 05 янв 2011, 04:19

freebsd 10 create jail

Сообщение admin »

Можно так , побыстрому

Код: Выделить всё

 bsdinstall jail /jail/www/root/

To cross install FreeBSD on a system without the required users/groups
you must either install them on the base system so that install and
mtree can use them or use the -DDB_FROM_SRC option when running the
installworld/installkernel/distribution targets.

make -DDB_FROM_SRC installworld DESTDIR=/jail/newjail
make distribution DESTDIR=/jail/newjail


exsample

conf file /etc/rc.conf

Код: Выделить всё

jail_enable="YES"	# Set to NO to disable starting of any jails
jail_list="db"




conf file /etc/jail.conf

Код: Выделить всё


db {
	path = "/jail/db/root";
	host.hostname = "host.contoso.ru";
	mount.devfs;
	devfs_ruleset = 4;
	ip4.addr = 127.0.1.33;
	interface = lo23;
#	allow.mount;
	mount.fstab = "/etc/fstab.db";
	exec.start = "/bin/sh /etc/rc";
        exec.stop = "/bin/sh /etc/rc.shutdown";
        allow.raw_sockets;
	allow.mount.nullfs;
}
остальные параметры описаны в man jail


Удаление JAIL

Код: Выделить всё

#chflags -R noschg *
Ответить