VMware Images:
|
Building A Virtual Server (VPS) With Debian 3.1 (Sarge) And OpenVZ - Page 3
3 Build Your Own Ubuntu OpenVZ Virtual Private Server TemplateFirst install the debootstrap utility from Ubuntu. This allows us to bootstrap Debian Sarge and Ubuntu installations. cd /tmp Now we bootstrap the Ubuntu installation. I use the VPS ID 110. You can use any ID, as long as it is unused on the server and > 100. debootstrap --arch i386 dapper /var/lib/vz/private/110 http://archive.ubuntulinux.org/ubuntu Apply the basic configuration to the VPS: vzctl set 110 --applyconfig vps.basic --save Set the name of the template: echo "OSTEMPLATE=ubuntu-6.06" >> /etc/vz/conf/110.conf Set the IP and nameserver. If you get this warning: "Warning: configuration file for distribution ubuntu-6.06 not found default used", ignore it. vzctl set 110 --ipadd 192.168.0.169 --save Add some additional package sources to the sources.list of the VPS: echo "deb http://archive.ubuntulinux.org/ubuntu dapper-updates main restricted"
>> /var/lib/vz/private/110/etc/apt/sources.list Start the VPS: vzctl start 110 Update the system: vzctl exec 110 apt-get update Disable gettys on terminals: vzctl exec 110 sed -i -e '/getty/d' /etc/inittab Fix some mounts: vzctl exec 110 rm -f /etc/mtab Run apt-get clean to remove unnecessary packages: vzctl exec 110 apt-get clean Stop the VPS and remove the IP addresses: vzctl set 110 --ipdel all --save Delete the SSH host keys and create a script thet generates new host keys on first boot of the VPS: rm -f /var/lib/vz/private/110/etc/ssh/ssh_host_* Pack the VPS to make it easily installable: cd /var/lib/vz/private/110 Hint: The dot in the line above is part of the command! It reads ....tar.gz[space][dot] Now we remove the VPS we used to setup the template: vzctl destroy 110 To create an instance of our Ubuntu server template, you can use this command: vzctl create 102 --ostemplate ubuntu-6.06-minimal --config vps.basic and then follow the other steps described in chapter 2.
4 LinksAll trademarks are the property of their respective owners. OpenVZ and Virtuozzo are trademarks of SWSoft.
|



print: 


Recent comments
1 day 5 hours ago
1 day 11 hours ago
3 days 7 hours ago
5 days 3 hours ago
6 days 6 hours ago
6 days 17 hours ago
1 week 8 hours ago
1 week 18 hours ago
1 week 23 hours ago
1 week 1 day ago