View Single Post
Old 14th January 2011, 09:09
CSsab CSsab is offline
Senior Member
Join Date: Apr 2010
Posts: 174
Thanks: 19
Thanked 32 Times in 27 Posts
Default LXC containers as VM's for ISPConfig 3 - First steps & quick start.

These steps work well on a Debian Lenny 5.0 container.
After logging into the container for the first time:

1. Type passwd and enter your new UNIX password.

2. Configure locales: dpkg-reconfigure locales Select your language from the long list. NOTE: Should be in utf8 format and the default for the container.
Clear out your locales cache: apt-get install localepurge
Then run localepurge

3. Configure local time. VERY IMPORTANT if you want to avoid problems with syncing timestamped files later (yikes!). Do this: dpkg-reconfigure tzdata and select correct timezone. Then run this diff -s /etc/localtime /usr/share/zoneinfo/`cat /etc/timezone` .. these should be the same and when you "poweroff" from the console you should see local time being correctly reported.

4. apt-get install vim-nox

5. Get a decent set of sources from here: -include "main", "security" and "volatile" repos.
vi /etc/apt/sources.list
Paste your new sources in and save.
apt-get update
apt-get upgrade

6. vi /etc/network/interfaces and set up a static ip for the container as you normally would.
/etc/init.d/networking restart
check the output of ifconfig - your network should reflect your changes.

7. vi /etc/hosts - write out the hosts file as you normally would - note that this will be a new file since the default container doesn't have a hosts file.
echo hostname.example.tld > /etc/hostname
/etc/init.d/ start

The output of hostname and hostname -f should now be hostname.example.tld

You should be good to go now with installing a base system for use in a multiserver setup although the master server (with quota installed) will still have to reside on the host server/physical machine unless you customize your fstab in the container.
Reply With Quote
Sponsored Links