-
Installing OpenVZ on CentOS
Posted on April 21st, 2009 No commentsOne virtualization product that is different from the others is OpenVZ. It will only do Linux-on-Linux virtualization as it is an OS-level virtualization product, where others are machine or hardware virtualization products. Essentially, OpenVZ is a glorified Linux chroot or BSD jail system that allows you to completely isolate processes from each other, increase security by keeping bits separate, and tightly control resource utilization. OpenVZ refers to these “virtual machines” as containers, virtual private servers (VPS), or virtual environments (VE).
As a result, OpenVZ is much lighter on system resources than full virtualization products like VMware or Xen.
Installing OpenVZ is quite simple. It requires a special kernel to provide the virtualization support it needs, and this can be obtained easily via the OpenVZ project itself. While the kernels are meant for RHEL4 and RHEL5, they will work on CentOS and track the upstream kernels quite closely.
To begin, you must download the OpenVZ repository control file in order for yum to become aware of the repository, and import the repository’s GPG signing key.
This can be done by executing:
# cd /etc/yum.repos.d/
# curl -OL http://download.openvz.org/openvz.repo
# rpm –import http://download.openvz.org/RPM-GPG-Key-OpenVZ
# yum update
The final command downloads the repository metadata for the OpenVZ repositories. By default, only the RHEL5 and utils repositories are enabled; you can enable other repositories if you are interested in trying newer kernels. For CentOS 5, be sure to use the RHEL5 repository.
To install the OpenVZ kernel, execute:
# yum install ovzkernel.x86_64
Substitute “x86_64″ above for “i386″ if you are running a 32-bit system. Once the kernel is installed, edit /boot/grub/grub.conf to make sure that the entry for the OpenVZ kernel is the default (if it is the first entry in the file, make sure that default=0 is set; if it is the third entry, use default=2; it should be the first entry, however).
Next, edit /etc/sysctl.conf and add:
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
kernel.sysrq = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
This will enable IPv4 forwarding, disable the proxy arp, enable source route verification, and disable all of the interfaces from sending redirects. It also enables the magic sysrq key. Some of these options may already be defined; if so, simply comment any you find earlier in the file.
You will also need to disable SELinux by setting SELINUX=disabled in /etc/sysconfig/selinux.
Now reboot the system. When it comes back up, install the OpenVZ utilities:
# yum install vzctl.x86_64 vzquota.x86_64
You do not need to specify the architecture on a 32-bit system; specifying it on the x86_64 platform is desirable; otherwise, it will want to install both the i386 and x86_64 packages.
Once this is done, execute:
# service vz start
Installation is complete and you are ready to set up your first OpenVZ virtual machine. I’ll look at creating an OpenVZ container in the future; in the meantime you can look at the OpenVZ wiki to read about how to create OS templates. Let me know if you have any specific questions about OpenVZ.
-
Account Creation [an error occurred while processing this directive]
Posted on April 2nd, 2009 No commentsSometimes you may notice problem to create a new account on your VPS server
Create a new Account
[an error occurred while processing this directive] Notification => aa@bb.net via EMAIL [level => 3]
Account CreationThe Cpanel logs reports the following error
[root@server /]tail -f /usr/local/cpanel/logs/error_log
edquota: Cannot set quota for user 553 from kernel on /dev/vzfs: No such process
edquota: Can’t write quota for 553 on /dev/vzfs: No such processSolution.
You just need to raise the quotagidlimit from the resource tab on the hardware node. If you do not have access to the Node ask your provider to raise the limit for you.
-
Setup VNC server on VPS
Posted on July 24th, 2008 No commentsWe will discuss setting up your VPS as a VNC server and using a client from your Windows machine to connect. Why would you want to use your VPS as a remote desktop? Well one example I can think of would be if you wanted to explore the GUI features of Linux before installing it on your box at home. Another advantage would be to install a desktop environment if you’re unfamiliar or uncomfortable with the command prompt to run administrative tasks…
Read the rest of this entry »



Recent Comments