LXC setup

LXC otherwise knows as Linux container is an operating system level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel.

So what are the advantages? and what can I use it for? These are the first questions which popped up in my head.

For the advantages part. its fast since it depends on the physical hardware. keeps the base OS clean.

I use LXC as a web server. and yes it is really good. for me its very reliable.

To install LXC in Ubuntu, since I’m using Ubuntu

sudo apt-get install lxc simple as that

After the installation I will be installing Ubuntu template and also will be naming it as webserver.

sudo lxc-create -n webserver -t ubuntu

The installation take a bit of time depending on your internet connection and hardware. After the installation you can start the container.

sudo lxc-start -n webserver -d

After starting the lxc you can ssh and install anything you want in to the container. but before that to find the ip address of the container you can use the following commnd

sudo lxc-ls --fancy webserver

default password for Ubuntu template is ubuntu. Now you can ssh and start installing everything you need in to the container.

Leave a Reply

Your email address will not be published. Required fields are marked *