Install KVM virtualizor

nstalling Softaculous Virtualizor for Linux-KVM is very simple.

Requirements

  • CentOS 5.x / 6.x / 7.x or Red Hat Enterprise Linux 5.x / 6.x or Scientific Linux 5.x / 6.x or Ubuntu 12.04 or Ubuntu 14.04 or Ubuntu 16.04(x86_64)
  • yum / apt-get
  • Storage to create the VPS (DomUs) disks

Notes :-
1. KVM module does not support 32 bit operating system. Please install a 64 bit OS if you want to install KVM.
2. KVM module requires VT enabled from the BIOS to be loaded.
3. We strongly recommend you make the bridge permanent. Guide – Making the bridge permanent
4. If you are using Ubuntu 18.04, please go through the following guide for making KVM bridge : KVM Bridge on Ubuntu 18.04

Partition Scheme

PartitionSizeDescription
/80-100 GBRoot partition containing all Hardware Node operating system files, OS templates and ISOs
SWAP4 GB +Paging partition for the Linux operating system(Swap memory is been used by virtual servers if there is shortage of real memory)
StorageAll the remaining space on the hard diskThis partition can be used to create either Logical Volumes or File Based Storage for the VPS (DomUs).
NOTE for LVM : You must NOT create any Logical Volume and MOUNT it. This must be an EMPTY VOLUME GROUP.
Virtualizor will not delete any pre-existing LVs in the Volume Group. But its recommended to have an empty Volume Group.

NOTE for File Storage : You must create and mount the folder.

Supported storage types

( LVM | File | Thin LVM | ZFS | ZFS Thin | ZFS Compressed | ZFS Thin Compressed | Ceph Block Device )

Installation

Open a Shell Terminal (e.g. PuTTY) and SSH to your server. Run the following commands:

wget -N http://files.virtualizor.com/install.sh 
chmod 0755 install.sh 
./install.sh email=your@email.com kernel=kvm 

Please give the email address correctly !

Installation Parameters

  • email – The Admin Email Address
  • kernel – In this case its kvm
  • noos – If you don’t want to download the DomU operating system for the DomU then please add noos=true as a parameter
  • beta – If there is a newer version of Virtualizor available and you would like to test it then please add beta=true as a parameter
  • nested_virt – If you want to enable Nested Virtualization on your server then please add nested_virt=1 as a parameter. If you enable this, it will install a new kernel for enabling nested virtualization.
  • lvg (optional) – If you are going to use LVM for the VPS storage. The Volume Group that will be used for the DomU (VPS) storage e.g. defaults to vg. It should have some OR ALL unallocated space to create LVMs for the VPS.
  • interface – You can specify the default interface that you want to set. If not provided it will be considered as eth0.
  • license – In case you are installing Virtualizor on internal network you will need to provide the VALID license key. To get internal license key you will need to open a support ticket.

The installation will begin immediately. It may seem that the installation has stopped, if your network speed is slow, but please let it continue. You will see something like this :


After the installation is completed you will be asked to reboot.

You can then visit the Admin Panel to create the Storage and the Virtual Servers and also manage your server.

Note : A log file of the installation process will be created – /root/virtualizor.log

Login

To login to the Softaculous Virtualizor Admin Panel, visit the following URL :https://Your-Server-IP:4085/http://Your-Server-IP:4084/

Login with the servers root details.

Admin Panel

After you login, you will see the Admin Panel Dashboard :

Ports

Virtualizor uses ports from 4081 – 4085. If there is any firewall restricting this, you will need to allow these ports.

For RHEL & CentOS < 7

iptables -I INPUT 1 -p tcp -m tcp --dport 4081:4085 -j ACCEPT
iptables -I INPUT 2 -p tcp -m tcp --dport 5900:6000 -j ACCEPT

For RHEL & CentOS 7+

firewall-cmd --zone=public --permanent --add-port=4081-4085/tcp
firewall-cmd --zone=public --permanent --add-port=5900-6000/tcp 
NOTE: If you are going to use Webuzo templates for VM creation, please allow ports 2002-2005

Create Storage

Before creating any VMs, its necessary to define your storage.
Navigate to Virtualizor Admin Panel -> Storage -> Add Storage
You will see the following wizard :

Fill in the details and define the storage.

NOTE: If you are using RAID setup on your server, please create the VG from RAID disks (e.g. /dev/md1) and not from the actual disks (e.g /dev/sda1).
Please note that disk names can be different as per your setup, above explanation is just for an example.

Virtualizor Network in KVM

By default eth0 will be assumed as the Network Interface. To tell virtualizor to use anything other Network Interface, You need to set it here.

You can change these settings any time from the Virtualizor Admin Panel -> Configuration -> Slave Settings. The following is a screenshot of the available settings :

Virtualizor will create a viifbr0 bridge.
viifbr0 detects the IP, Netmask, GATEWAY from :

/etc/sysconfig/network-scripts/ifcfg-INTERFACE_NAME

Hence if you change the above file, you will need to restart the virtualizor network :

root> service virtnetwork restart

Start Command :

root> service virtnetwork start

Stop Command :

root> service virtnetwork stop

Trouble Shoot

NOTE : In all cases please remember to disable SElinux. The Virtualizor installer will try to disable it. For KVM make sure that VT is enabled from bios so VPS can be able to started .

Cant open http://IP-Address:4084

Please check if your iptables firewall is running You can disable it with the following command :

root> service iptables stop

For CentOS 7 :

root> systemctl stop firewalld

Disk resize issue on Ubuntu 16 and Ubuntu 18

NOTE : For vps hostname/disk resize issues on Ubuntu 16.04 and Ubuntu 18.04 with sfdisk version 2.27.1 , follow these steps to downgrade sfdisk on the server :

mv /sbin/sfdisk /sbin/sfdisk_new
wget -O /sbin/sfdisk http://files.virtualizor.com/utility/sfdisk
chmod 755 /sbin/sfdisk

install CFS

Installation
============
Installation is quite straightforward:

cd /usr/src
rm -fv csf.tgz
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

Next, test whether you have the required iptables modules:

perl /usr/local/csf/bin/csftest.pl

Don't worry if you cannot run all the features, so long as the script doesn't
report any FATAL errors

You should not run any other iptables firewall configuration script. For
example, if you previously used APF+BFD you can remove the combination (which
you will need to do if you have them installed otherwise they will conflict):

sh /usr/local/csf/bin/remove_apf_bfd.sh

That's it. You can then configure csf and lfd by reading the documentation and
configuration files in /etc/csf/csf.conf and /etc/csf/readme.txt directly or
through the csf User Interface.

csf installation for cPanel and DirectAdmin is preconfigured to work on those
servers with all the standard ports open.

csf auto-configures your SSH port on installation where it's running on a non-
standard port.

csf auto-whitelists your connected IP address where possible on installation.

You should ensure that kernel logging daemon (klogd) is enabled. Typically, VPS
servers running RedHat/CentOS v5 have this disabled and you should check
/etc/init.d/syslog and make sure that any klogd lines are not commented out. If
you change the file, remember to restart syslog.

See the csf.conf and readme.txt files for more information.

Perl Modules
============

While most should be installed on a standard perl installation the following
may need to be installed manually:

# On rpm based systems:
yum install perl-libwww-perl.noarch perl-LWP-Protocol-https.noarch perl-GDGraph

# On APT based systems:
apt-get install libwww-perl liblwp-protocol-https-perl libgd-graph-perl

# Via cpan:
perl -MCPAN -eshell
cpan> install LWP LWP::Protocol::https GD::Graph



InterWorx
=========

1. Enable csf in InterWorx > NodeWorx > Plugins > csf

2. See the InterWorx section in /etc/csf/readme.txt


Webmin Module Installation/Upgrade
==================================

To install or upgrade the csf webmin module:

Install csf as above
Install the csf webmin module in:
  Webmin > Webmin Configuration > Webmin Modules >
  From local file > /usr/local/csf/csfwebmin.tgz > Install Module


Uninstallation
==============
Removing csf and lfd is even more simple:

cd /etc/csf
sh uninstall.sh

Converting CentOS server with cPanel

CloudLinux OS is simple to install. Here, you will learn how to convert a cPanel-based server from CentOS to CloudLinux OS.

First, you will need a software activation key or an IP-based license. The 30-day trial key can be obtained for free by requesting it from the CLN portal via our website (note that CLN requires registration). If you have a paid license key, it can be found in CLN, or in your welcome email. For more information, refer to our “licensing” article.

To install, open an SSH connection to your server using your preferred SSH console application.You will need to have root level access in order to proceed.

Here is the syntax we are using to execute the conversion process:

$ wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
$ sh cldeploy -k <activation_key> # if you have activation key
or
$ sh cldeploy -i # if you have IP based license
$ reboot

CloudLinux OS install script is smart – it detects the environment, type of virtualization, control panel, specific hardware which might require additional drivers installation and more.

If EasyApache version 4 is in use, the script will install all the required RPM packages automatically, including the mod_hostinglimits package for the proper LVE operation.

Once the installation is completed, the server needs to be rebooted. It is required in order to boot the server with our kernel, which is specifically crafted for the LVE support and limits operation.

To make sure that the server is running the correct kernel, we can access the server via SSH again and execute the “uname -a” command.

CloudLinux kernel contains “lve” in its name – when you see it, you’ll know that the server is running using the correct kernel.

Then, you will need to check the WHM interface. As you will see, LVE Manager plugin has been installed during the conversion process. For more details regarding LVE Manager features and usage, please refer to this video.

You are all set – the CentOS server with cPanel has been successfully converted to CloudLinux OS.

DirectAdmin Installation Guide

Step 1: Do you meet the system requirements?

– Clean OS install: check install.php to ensure you’ve got a supported OS
– At least one external IP address (IP Requirements)
– SSH installed, gcc, g++, openssl-devel installed.
– Run the pre-install commands before starting the install

Step 2: Make sure your license information is correct.

Sign into your client account at https://www.directadmin.com/clients and click the “view” link next to your license.

Verify that the server IP address and operating system is correct. Also make sure that the license is Active and Verified (if it isn’t, then our billing system hasn’t processed your order yet).

Step 3: Begin the installation!

**** SPECIAL NOTICE for non-root ssh logins ****
If logging in as a user other than admin or root (using su to gain root access):

You *must* add “AllowUsers username” to /etc/ssh/sshd_config before you log out from root or you’ll lose root on the server forever, and you’ll have to format.

  1. Login as root and download the setup.sh filewget -O setup.sh https://www.directadmin.com/setup.sh
    Hint: Use “fetch” instead of “wget” on FreeBSD systems.
  2. Change permissions on the setup.sh filechmod 755 setup.sh
  3. Run the script./setup.sh auto
    The auto method will be best for most people. It automatically installs everything for you, including the CSF firewall.It can also be called as ‘./setup.sh’ without options, which requires input but allows for customization.

    Important: The hostname should not be the same as the primary domain name. e.g. gary.com is not a good hostname, where server.gary.com is. Having the same host/main domain name will cause e-mail and FTP problems. Also, please make sure the hostname resolves once you setup DNS.

That’s it! Please see below if you are installing on a VPS, or wanting to setup DirectAdmin for secure (https://) control panel access.

Special notice for VPS/VDS installs:

After the install, add the following to /usr/local/directadmin/conf/directadmin.conf:
ethernet_dev=devicename
For example, on many vps systems it will be:
ethernet_dev=venet0:0
Other systems where the IP is not the base IP on the device, you’d need to simply set the correct number:
ethernet_dev=eth0:1
Or other systems with the IP on a different device, it might be:
ethernet_dev=eth1
Type:/sbin/ifconfig
to see which device your IP is in.

Replace devicename with the FULL devicename reported by ifconfig. If your VDS/VPS system emulates eth0, then you may skip this step.

Setup SSL Certificates:

This step is only required if you wish to use DirectAdmin through SSL. You will also have to change set SSL=1 in the directadmin.conf file: http://help.directadmin.com/item.php?id=15

Accessing the Control Panel

DirectAdmin can be accessed at http://server.ip.address:2222 — use the Admin username/password specified in the setup.txt file in your scripts directory.

Dealing with RPM errors

When installing RPMs, errors can sometimes occur. Don’t panic, solving them is usually easy. If you didn’t know what to install during your RedHat installation, you might have installed a few services, such as apache and sendmail. These services must be removed before the rpm will be able to be installed.
For example, lets say you are trying to install exim and you get the following:
# rpm -ivh exim-3.36-2.i386.rpm
Preparing… ########################################### [100%]
file /somefile from install of exim-3.36-2 conflicts with file from package sendmail-8.1

This would mean that sendmail is already installed on your server and you must remove it. This can easily be accomplished by running the following:
rpm -e –nodeps sendmail
Then you will be able to install your rpm. This follows for other services such as apache, apache-devel, wu-ftp, php, MySQL and so forth. If you need to figure out if you already have a service installed, you can run
rpm -q servicename
or
rpm -qa | grep substring
Where substring is just a word. For example, using “apache” might return:
# rpm -qa | grep apache
apache-fp-1.3.27-2
apache-fp-devel-1.3.27-2
apache-fp-manual-1.3.27-2

Troubleshooting

If you are having trouble with RPMs hanging, please look at: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=73097

Need More Information?

You can e-mail questions to sales@directadmin.com or send an inquiry by visiting the contacts page. We are available Monday through Friday, 9 AM – 5 PM Mountain Standard Time. You may also visit the forum to see if your question has been answered there.

Installation Guide – Installation

To install cPanel & WHM on your server, run the following command:

cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest

Note:

We recommend that you run the installation command within a Linux screen session. The Linux screen command allows you to create a shell session that will stay active through a network disruption.

This command changes your session to the home directory, downloads the latest version of cPanel & WHM, and runs the installation script.
  1. To determine whether your operating system contains screen and it exists in your path, run the which screen command. The system will return /usr/bin/screen if screen exists on your system and whether it exists in your path.
    • If your system does not contain screen, you can install it with the yum install screen command.
    • To run a screen session, enter the screen command. Then, run the installation command.
  2. If your session disconnects for some reason, log back in to your server and run the screen -r command. This will reconnect you to your screen session.

Important:

  • cPanel, L.L.C. designs software for commercial hosting. Therefore, we only license publicly visiblestatic IP addresses. We do not license dynamic, reserved, sticky, or internal IP addresses.
  • We do not provide an uninstaller. If you wish to remove our software, you must reformat the server.
  • Only install cPanel & WHM on a freshly-installed operating system.
  • You must log in to the server as the root user in order to install cPanel & WHM. If you do not possess root-level access, contact your system administrator or hosting provider for assistance.
  • We recommend that you use the cPanel & WHM installer, which installs all of the services that it requires. If you install services before you install cPanel & WHM, you will encounter compatibility issues.
  • New installations of cPanel & WHM default to the fast installation mode. To disable the fast installation mode, use the steps in our Customize Your Installation documentation.