= LXC - Linux Containers = == 2014-01-11 == * <參考> [http://ofirm.wordpress.com/2014/01/05/creating-a-virtualized-fully-distributed-hadoop-cluster-using-linux-containers/ Creating a virtualized fully-distributed Hadoop cluster using Linux Containers] * 測試環境:Debian Wheezy 7.1 netinstall ISO with [http://github.com/jazzwang/preseed preseed] {{{ jazz@debian:~$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.3 (wheezy) Release: 7.3 Codename: wheezy }}} * 安裝 LXC {{{ jazz@debian:~$ sudo apt-get install lxc }}} * 產生虛擬機器 {{{ jazz@debian:~$ sudo lxc-create -t debian -n test1 jazz@debian:~$ sudo lxc-start -d -n test1 }}} * 安裝 LXC Web Panel {{{ root@debian:~# wget http://lxc-webpanel.github.io/tools/install.sh -O - | bash }}} * <狀況> 指令可以建立 LXC VM, 但網頁似乎不太靈光。 == 2014-01-12 == * 測試環境:Ubuntu 12.04 LTS {{{ jazz@jazzbook:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.2 LTS Release: 12.04 Codename: precise }}} * 感覺上 LXC 1.0 的功能比較齊全(Ex. 支援根據 DNS 分配 IP 的機制),因此直接採用 precise-backports 套件庫中的 lxc 1.0 版本 {{{ echo "deb http://free.nchc.org.tw/ubuntu precise-backports main universe" > /tmp/precise-backport.list sudo mv /tmp/precise-backport.list /etc/apt/sources.list.d/ sudo apt-get update }}} * 安裝 LXC 1.0 版本 {{{ sudo apt-get install lxc }}}