Google Plus

How to install OpenVZ and Vtonf control panel in centos

Written by Mel Kham on . Posted in Linux tutorials

OpenVZ is an operating system-level virtualization technology based on the Linux kernel and operating system. OpenVZ allows a physical server to run multiple isolated operating systemopenvz instances, known as containers, Virtual Private Servers (VPSs), or Virtual Environments (VEs). It is similar to FreeBSD Jails and Solaris Zones.

As compared to virtual machines such as VMware and paravirtualization technologies like Xen, OpenVZ is limited in that it requires both the host and guest OS to be Linux (although Linux distributions can be different in different containers). However, OpenVZ claims a performance advantage; according to its website, there is only a 1–3% performance penalty for OpenVZ

as compared to using a standalone server. One independent performance evaluation confirms this. Another shows more significant performance penaltie s  depending on the metric used.

In this tutorial will show you how to install OpenVZ in CentOS and how to install Vtonf, another web interface for OpenVZ

I- Install OpenVZ:

1-First add openVZ repository to Centos:

Open terminal and copy the commands:

wget http://download.openvz.org/openvz.repo
rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ
cp openvz.repo /etc.recpo.d

 

2-Install  openvz  kernel:

yum install ovzkernel

3- edit the /etc/systcl.conf

Open /etc/systcl.conf  and add these lines:

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 

4- Disable Selinux

To disable Selinux, first open the config file

vi  /etc/selinux/config  

Then look for the line bellow and make sure that is disabled

SELINUX=disabled

 

5- Install openvz tools and plugins

yum install vzctl vzquota

6- Restart openv Services:

service vz restart

 

II – Create Virtual OS /Containers

we have Openvz installed. Now is time to create a Virtual os /containers, for that we need to download an OS template.

An OS template cache is an OS template installed into a container and then packed into a gzipped tarball. Using such a cache, a new container can be created in a matter of minutes, if not seconds.

In the example bellow we used Slackware template, for other templates please visit this link.
First cd the cache folder

cd   /vz/template/cache 


and download the template :

[root@localhost cache]# wget  http://download.openvz.org/template/precreated/contrib/slackware-13.0-i386-minimal.tar.gz
--2010-06-27 16:55:33--  http://download.openvz.org/template/precreated/contrib/slackware-13.0-i386-minimal.tar.gz
Resolving download.openvz.org... 64.131.90.11
Connecting to download.openvz.org|64.131.90.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 39641862 (38M) [application/x-gzip]
Saving to: `slackware-13.0-i386-minimal.tar.gz'

100%[===============================================================>] 39,641,862  4.48M/s   in 14s     

2010-06-27 16:55:47 (2.71 MB/s) - `slackware-13.0-i386-minimal.tar.gz' saved [39641862/39641862]

 

 

  • Lets create the VPS 102 now

vzctl  create     102    --ostemplate    slackware-13.0-i386-minimal     --config   basic 

Output:

Creating container private area (slackware-13.0-i386-minimal)

Performing postcreate actions

Container private area was created


  • Make this VM(virtual machine start on boot)

[root@localhost cache]# vzctl set 102  --onboot yes --save
Saved parameters for CT 102make a Hostname for The machien:vzctl set 102 --hostname Hackers.example.com --saveGive Ip adress 192.168.0.130 to the machine:
[root@localhost cache]#  vzctl set 102 --ipadd 192.168.0.130  --save
Saved parameters for CT 102
[root@localhost cache]#
  • Now start the VM machine 102
  vzctl start

Output

102 Starting container …Container is mountedAdding IP address(es): 192.168.0.130Setting CPU units: 1000Set hostname: Hackers.example.comContainer start in progress…

  • Make a root password for the machine:
  vzctl exec 102 passwd 

Output:

New password: Zz123456

Re-enter new password: Zz123456

Changing password for root

Enter the new password (minimum of 5, maximum of 127 characters)Please use a combination of upper and lower case letters and numbers.Password changed


  • Enter The slackware machine 102
  vzctl enter  102 

Output:

entered into CT 102

root@Hackers:/# cat /etc/slackware-version

Slackware 13.0.0.0.0

Stop of start or Exit

More commands :

To restart  use : vzctl restart

To stop  use :   vzctl stop

to destroy the   vm machine user  : vzctl destro 102

For more commands use :vzctl -help

III- Install Vtonf a web interface manager for OpenVZ

VTONF is a Virtual private server (VPS) control panel. It is designed to perform VPS operations in a GNU/Linux server having OpenVZ virtualization technology. VTONF is a Free software distributed under GPL license.

  • Install  Vtonf :

Open terminal and type the commands bellow ( Don`t forget to change the version of vtonf  vtonfinstaller.x.x-beta1.tar.gz to the current version you are trying to install)

cd /tmp
wget http://mesh.dl.sourceforge.net/sourceforge/vtonf/vtonfinstaller.x.x-beta1.tar.gz
tar xvfz vtonfinstaller.1.0-beta1.tar.gz
cd vtonfinstaller.x.x-beta1
./install

When Vtonf control panel installation is completed, you can login to the control panel using the following informations:

 http://192.168.0.109:8001/
Login Name : admin
Password : admin

{loadposition user9}

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • http://www.distrolink.com DistroLink

    Thank you for your post!

    Personal, I perfer OpenVZ to Xen.

  • PieterB

    I do as well (OpenVZ >> Xen >> KVM)
    but I like to mention, unfortunately, vtonf isn’t really developped anymore… (if you look on sourceforge…)

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

SK

|

Hey Abhishek

Yes there are many open source tools available to meet your requirements. They are easy to manage and has a decent web gui to configure. We will publish all of them one by one shortly. Stay tuned with us.

LinuxSytesNet

|

sabayon facebook group is not maintained by him but a French guy. Go back to your zorin os.

Nidal Samara

|

How do I save the entier URL?
for example: page.asp?page=12,
After adding the IfModule in .htaccess I see the correct 404, but 404 url is not shoing the query string , only page.asp

abhishek Bagusetty

|

Hey Mel,

First of all, its good that you have figured a way to block torrents using iptables. I am new to networking and would like to do couple of things.

1) Monitor the network activity in the home network

2) Block all the torrents from downloading.

Is there a tool or a way in linux which could give me some solutions to meet the above mentioned cases. I dont want to use any commercial programs as I am more towards OpenSource. It would be greatful if you could offer me some help.

Thanks,

Abhi

Abhishek

Department of Chemical Engineering

The University of Utah

Ernesto Gutierrez

|

Mel, I’ve been unsuccessful at installing citrix receiver on a 64 bit fedora install.
Eventhough I am following your instructions to the T.

Can you provide guidance via email?

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .