Thursday, June 4, 2009

New Debian/Ubuntu image install howto

Some old note I gathered for installing a new debian/ubuntu image. This may be somewhat general and a better versionmay be available somewhere :). Do check it out.

apt-get install debootstrap
debootstrap --arch i386 [ubuntu version] /vz/private/1?? http://archive.ubuntulinux.org/ubuntu
vzctl set 1?? --applyconfig vps.basic --save

Set the name of the template:
echo "OSTEMPLATE=ubuntu-?.?" >> /etc/vz/1??.conf

# Ignore this if it shows - Warning: configuration file for distribution ubuntu-?-? not found default used

vzctl set 1?? --ipadd 192.168.x.y --save
vzctl set 1?? --nameserver 192.168.x.z --save

Update the sources list in /vz/private/1??/etc/apt/sources.list if needed

vzctl start 1??

vzctl exec 1?? apt-get update
vzctl exec 1?? apt-get -u upgrade
vzctl exec 1?? apt-get install ssh libedit2 openssh-client openssh-server

vzctl exec 1?? sed -i -e '/getty/d' /etc/inittab

vzctl exec 1?? rm -f /etc/mtab
vzctl exec 1?? ln -s /proc/mounts /etc/mtab

### Now the vps is ready to either run or to create a template

vzctl set 1?? --ipdel all --save
vzctl stop 1??

cd /vz/private/1??
tar czf /vz/template/cache/ubuntu-?.?-minimal.tar.gz .

# now cleanup
vzctl destroy 1??

To deploy use -
vzctl create 10? --ostemplate ubuntu-?.?-minimal --config vps.basic

Read the rest of this entry...

Bookmark and Share My Zimbio http://www.wikio.com

Wednesday, June 3, 2009

Apache Virtual Hosts

I've received several pm's on how to create virtual hosts via Apache, so I decided to give an sample Apache virtual host config so they can have something to start with

For a more complete detail on configuring virtual hosts in Apache you can get a complete guide via Google.

Thanks for the messages, the Apache virtual host config sample is below :

NameVirtualHost *

#### NOTE!!! This entry must be first so any connection that does
# not match a virtualhost name will match the default (first) server.

ServerAdmin webmaster@domain.com
DocumentRoot /path/to/doc/root/for/this/server
ServerName www.domain.com



ServerAdmin webmaster@otherdomain.com
DocumentRoot /path/to/other/domain/root
ServerName www.otherdomain.com



ServerAdmin webmaster@moredomains.com
DocumentRoot /path/to/you/know/where
ServerName www.guesswhere.com


Read the rest of this entry...

Bookmark and Share My Zimbio http://www.wikio.com