在Debian Etch上安装使用OpenVZIntroductionVirtualization is nice! A good practice for servers, since it makes things more secure, scalable, replacable, and replicable. All this at the cost of little added complexity. This guide is written during an install of a Supermicro machine with 2 dual-core opterons (64-bit), 2 identical disks (for RAID) and a load of memory. Why OpenVZ and not XEN or the recent KVM kernel module? Well, XEN is not very stable for 64-bit architectures (yet), and it comes with quite a bit of overhead (every VM runs its own kernel) due to its complexity. KVM is very simple but restricts you to run a kernel as one process, so the VM cannot benefit from multi core systems. With OpenVZ only one kernel is run for the host environment _and_ all the VMs, this makes the setup lean and a good candidate for webservers. Install the hosting systemFirst install Etch (make sure to set up RAID with the installer). You might want to rid yourself of some cluttering directories and links in your root (and, as the rest of the guide, as root): cd / Now we want to compile a custom OpenVZ enabled kernel, we kind-of followed this guide on the OpenVZ site. A short overview of what we did: apt-get update Then (after you might have modified the /boot/grub/menu.lst a bit to default to the right kernel) you can reboot. After the reboot using the OpenVZ enbabled kernel check if all works: ifconfig # should list your interfaces and an additional "venet" inteface Make Virtual Private Servers (VPSs)No we setup, start a VPS from the default minimal template (you can find it in /var/lib/vz/template/cache): vzctl create 101 --ostemplate debian-3.1-amd64-minimal --config vps.basic Then you can connect with the VPS by ssh 10.0.0.101 , and note the colorful prompt... This template is a Sarge (3.1) template, and I want it to be Etch (4.0), so when logged in to the VPS as root do: nano /etc/apt/sources.list # edit it to match the sources.list on you host (Etch) install Now try out your new VPS, and make it workable, install the packages you like to have around since this systems will later serve as basis for further VPSes. Next we creating a template from the just customized VPS, this is an easy thing: vzctl stop 101 # stop it As Borat would say: "Nice! I like!" No we can setup and run some additional VPSs, as before but now slightly modified: vzctl create 102 --ostemplate debian-etch-20061218-amd64 --config vps.basic 上一篇:在Debian中打造属于自己的deb包 下一篇:Debian+vsftpd+MySQL实现虚拟用户 更多相关文章
|
推荐文章
精彩文章
|