- 266,209 hits
Anything about Ubuntu, Centos, openSuSe and Fedora
LXC (LinuX Containers) is a lightweight virtualization that lets you run an isolated processes and resources. You can run this so-called “containers” inside your Linux host and use the resources without the need of paravirt drivers, the performance is almost as native machine does.
How to install?
1. First install the necessary packages.
$> sudo apt-get install lxc bridge-utils debootstrap
2. Mount the cgroup, which lxc uses to regulate and limit resources for the containers.Modify your /etc/fstab and add the following:
none /cgroup cgroup defaults 0 0
3. Then configure your network card to bridge mode.
auto lo iface lo inet loopback auto br0 iface br0 inet dhcp bridge_ports eth0 bridge_stp off bridge_maxwait 5 post-up /usr/sbin/brctl setfd br0 0
4. You can also set it to static IP.
auto lo iface lo inet loopback auto br0 iface br0 inet static address 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.1 bridge_ports eth0 bridge_stp off bridge_maxwait 5 post-up /usr/sbin/brctl setfd br0 0
5. Reboot and now your set. You can now create your own sets of containers or use the pre-configured from this site. I, myself still failed to create my own container templates, so for now I’m still using what bodhizazen have created.