CloudLinux overview and installation steps

CloudLinux is an extremely amazing & powerful operating system which was built on the top of open source operating system, CentOS. In shared hosting environment we can restrict the PHP memory usage, cron job execution, disk space, bandwidth, etc.., and we can’t control/restrict the resource usage such as CPU, memory, virtual memory and process. Before cloudlinux, we faced so many problems in our shared environment and it keeps spike’s on server load and mysql usage , later we can’t control anything. We lose many customers due to temporary suspend for server spike. after cloudlinux installation on server, we can control everything and our environment is stable and secure and there will be no spike and there will be no downtime on server.

Cloudlinux Ultimate features:

  • LVE (Lightweight Virtualized Environment)
  • CageFS
  • MySQL Governor
  • SecureLinks
  • PHP Selector

Cloudlinux Technology:

  • Isolates users from each other to avoid the “bad neighbour effect”
  • Prevents users from seeing configuration files and other private information
  • Allows end user to select PHP versions 4.4, 5.1, 5.2, 5.3, 5.4, 5.5 and 5.6
  • Gives the power to monitor and controls many things, such as CPU, IO, Memory, and others
  • Helps to restrict and throttle MySQL database abusers
  • Compatible with all major control panels
  • Interchangeable with CentOS and RHEL

  • 1) Lightweight Virtualized Environment (LVE)

    Lightweight Virtualized Environment is a kernel-level technology, which isolates each tenant into his own environment. Each tenant has limits on the amount of resources (CPU, IO, Memory, Processes, etc.) that can be used. If the tenant hits the limit, other users would not notice anything because the offender would be immediately throttled. There would be no resource spikes, no server overloads, no angry phone calls from users … what a wonderful life it would be!

    CloudLinux allows you to control:

    • CPU
    • Memory
    • IO
    • Number of processes
    • Number of concurrent Apache connections
    • MySQL CPU usage
    • MySQL read/write usage

    2) CageFS

    CageFS is a virtualized per-user file system that uniquely encapsulates each customer, preventing users from seeing each other and viewing sensitive information. Additionally, CageFS prevents a large number of attacks, including most of the privilege escalation and information disclosure attacks. This innovation is completely transparent to your customers—no need to change their scripts.

    3) MySQL Governor

    MySQL Governor is a set of utilities to monitor and operate MySQL usage in a shared hosting environment. The monitoring is done via resource usage statistics per each MySQL thread. New MySQL Governor tracks exact CPU and IO usage as it happens. With such real-time statistics, we can instantly detect abusers and throttle them.

    4) SecureLinks

    SecureLinks is a kernel-level technology that prevents all known symbolic link attacks, which enhances the security level of the servers even further.

    5) PHP Selector

    With this new CageFS tool, each customer can select PHP version as well as modules customer wants to use. And CloudLinux makes sure that PHP is updated as per the need very fast, making sites more secure and customers pleased.

    1) How to install Cloudlinux

    Use the below steps to install cloudlinux on your server.

    # Install cloudlinux on centos server #
    [email protected] [~]# wget
    [email protected] [~]# sh cldeploy -k 
    [email protected] [~]# reboot

    Once you have rebooted the server, the script automatically detects and supports the bunch of control panels also it will install the required application such as LVE, CageFS, MySQL Governor and command line tools.

    To use LVE you have to have CloudLinux kernel installed, and LVE module loaded.

    # you can check the kernel by running the following command #
    [email protected] [~]# uname -r
    # To see if lve kernel module is loaded #
    [email protected] [~]# lsmod|grep lve
    lve                    66418  1
    # To see if iolimits module is enabled #
    [email protected] [~]# lsmod|grep iolimits
    iolimits                4999  4
    # You can toggle LVE on/ff by editing #
    [email protected] [~]# cat /etc/sysconfig/lve
    # You can toggle IO limits by editing #
    [email protected] [~]# cat /etc/sysconfig/iolimits

    Uninstall Cloudlinux

    # uninstall cloudlinux on centos server #
    [email protected] [~]# wget -O cldeploy
    [email protected] [~]# sh cldeploy -c
    [email protected] [~]# reboot

    Please, note that some of the packages from CloudLinux repo will still be present. They are same as CentOS packages, and no need to be removed. They will be updated in the future from CentOS repositories, as new versions come out.

    2) How to install LVE Manager

    LVE Manager is installed by default on most servers. If it is missing you can always install it by running

    # Installing LVE Manager #
    [email protected] [~]# yum install lvemanager
    # LVE defult limit configuration file #
    [email protected] [~]# cat /etc/container/ve.cfg
    # Manage resource using lvectl command #
    [email protected] [~]# lvectl

    3) How to install CageFS

    CageFS is installed by default on most of the servers. If it is missing you can always install it by running

    # Installing CageFS #
    [email protected] [~]# yum install cagefs
    # Manage cagefs using cagefsctl command #
    [email protected] [~]# /usr/sbin/cagefsctl
    # To uninstall CageFS, start by disabling & removing all directories #
    [email protected] [~]# /usr/sbin/cagefsctl --remove-all
    # Remove CageFS RPM #
    [email protected] [~]# yum remove cagefs

    4) How to install MySQL Governor

    Run the below command to install MySQL Governor on your server.

    # Installing MySQL Governor on MySQL Server #
    [email protected] [~]# yum install governor-mysql
    [email protected] [~]# /usr/share/lve/dbgovernor/ --install
    # Installing MySQL Governor on MariaDB Server #
    [email protected] [~]# yum install governor-mysql
    [email protected] [~]# /usr/share/lve/dbgovernor/db-select-mysql --mysql-version=mariadb55
    [email protected] [~]# /usr/share/lve/dbgovernor/ --install
    # start MySQL Governor #
    [email protected] [~]# service db_governor start
    # stop MySQL Governor #
    [email protected] [~]# service db_governor stop
    # restart MySQL Governor #
    [email protected] [~]# service db_governor restart
    # MySQL Governor configuration file #
    [email protected] [~]# /etc/container/mysql-governor.xml
    # To remove MySQL governor #
    [email protected] [~]# /usr/share/lve/dbgovernor/ --delete

    5) How to install PHP Selector

    The installation of PHP Selector presumes that you already have CageFS & LVE Manager installed.

    # Installation of different versions of PHP & modules #
    [email protected] [~]# yum groupinstall alt-php
    # Update CageFS & LVE Manager with support for PHP Alternatives #
    [email protected] [~]# yum update cagefs lvemanager
    # remove PHP Selector #
    [email protected] [~]# yum groupremove alt-php

    That’s all now, Will come with CloudLinux Administrative commands. Please stay tune with 2daygeek.

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...