Tag: cloudlinux

  • Set unlimited resources for a user in cloudlinux

    Set unlimited resources for a user in cloudlinux

    To set unlimited resources for a user in cloudlinux, run the following command:

    lvectl set-user user --unlimited

    Back to cloudlinux

  • Connect to backend failed: connect to lsphp failed: 110

    Connect to backend failed: connect to lsphp failed: 110

    On a CloudLinux Server, websites stopped working with the error message “Service Unavailable”. On checking error_log in /usr/local/apache/logs, found following error message

    [Fri Jul 09 15:32:37.884950 2021] [lsapi:error] [pid 1639593:tid 47853204383488] [client 207.46.13.54:46915] mod_lsapi: [host ronnie.serverok.in] [req GET / HTTP/1.1] Connect to backend failed: connect to lsphp failed: 110
    

    The problem was due to the server got booted using the default CentOS kernel instead of CloudLinux Kernel.

    [root@server ~]# uname -a
    Linux server.serverok.in 3.10.0-1062.9.1.el7.x86_64 #1 SMP Thu May 27 10:10:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
    [root@server ~]#
    

    If you were using Cloudlinux kernel, “uname -a” command will show kernel with “lve” in the name. Example 3.10.0-962.3.2.lve1.5.56.el7.x86_64

    To see the list of kernels available, run

    awk -F\' '$1=="menuentry " {print i++ " =  "$2}' /etc/grub2.cfg
    

    Example

    [root@server ~]#  awk -F\' '$1=="menuentry " {print i++ " =  "$2}' /etc/grub2.cfg
    0 =  CloudLinux (3.10.0-962.3.2.lve1.5.56.el7.x86_64) 7.9 (Boris Yegorov)
    1 =  CloudLinux (3.10.0-1062.9.1.el7.x86_64) 7.9 (Boris Yegorov)
    2 =  CloudLinux (3.10.0-962.3.2.lve1.5.27.el7.x86_64) 7.9 (Boris Yegorov)
    3 =  CloudLinux (0-rescue-21361cf887984f57a840ce7ea6a3f75c) 7.9 (Boris Yegorov)
    [root@server ~]#
    

    To set default kernel, run

    grub2-set-default 0
    

    This will set kernel entry to the first entry.

    Verify default kernel with

    grub2-editenv list
    

    Example

    [root@server ~]# grub2-editenv list
    saved_entry=0
    [root@server ~]#
    

    Reboot the server with

    reboot
    

    Once rebooted, verify the server is booted with CloudLinux kernel.

  • Red Hat Killing CentOS Linux, Fight for CentOS clone

    Red Hat Killing CentOS Linux, Fight for CentOS clone

    RedHat, parent company of CentOS Linux announce it will stop supporting CentOS 8, the latest version of CentOS. CentOS is build from the source code RHEL, making a free version of stable and well-tested enterprise ready RHEL Linux. CentOS 7 will keep getting security updates until it reaches End Of Life June 30th, 2024. For Red Hat, maintaining CentOS wont help with their business. Now they don’t need to maintain CentOS, this will force many users to pay for Red Hat Enterprise Linux (RHEL).

    RedHat Killing CentOS Linux

    The new version of CentOS known as CentOS Stream is a rolling release. It will be used as a staging version of RHEL. Red Hat expect CentOS Stream to be stable and allow community participation as users will be able to contribute to CentOS Steam. With CentOS, community contribution was limited because it was a copy of RHEL.

    CentOS is populary used in web hosting servers as cpanel only supposed RHEL based Linux. With death of CentOS 8, cpanel have announced they will accelerate investment in development efforts to support additional operating systems. cPanel will suport Ubuntu LTS and expect to deliver a production-ready version in late 2021. After Ubuntu LTS, they will look into supporting Debian. Ubuntu is very popular with Cloud Servers as it come with latest software compared to CentOS. With many developers already using Ubuntu on their Desktop, supporting Ubuntu is wise decision by cpanel.

    With CentOS 8 unexpected demise, many users will be looking for alternative OS. This opens up market for next CentOS clone.

    Rocky Linux

    CentOS co-founder, Gregory Kurtzer announced he will be releasing his own Red Hat Enterprise Linux (RHEL) replacement Rocky Linux. No ETA on release date yet.

    https://rockylinux.org

    You can join discussion on their reddit.com/r/RockyLinux/

    Project Lenix

    Igor Seletskiy, CloudLinux CEO and founder said they will make their own RHEL patch to patch compatible Open Source Linux – Project Lenix.

    CloudLinux is a CentOS based commerical Linux, that is popular amoung web hosting providers as it allow resource limit per user and user isolation with CageFS. They also have support for kernel update with out reboot.

    CloudLinux will be investing more than a million dollar into Project Lenix. CentOS 8 users will be able to convert into Project Lenix or CloudLinux easily with out reboot. In the announcement Igor Seletskiy said “Red Hat’s announcement has left users looking for an alternative with all that CentOS provides and without the disruption of having to move to alternative distributions. We promise to dedicate the resources required to Project Lenix that will ensure impartiality and a not-for-profit community initiative. CloudLinux already has the assets, infrastructure, and experience to carry out the mission, and we promise to be open about the process of developing Project Lenix”.

    See CentOS

  • Cpanel CloudLinux set all users to use alt-php

    If your cpanel server have cloudlinux + PHP Selector installed, you need to set all site to use inherit PHP before you can use PHP Selector.

    This can be done in MultiPHP Manager or using command line

    for i in $(cut -d: -f1 /etc/userdatadomains );do whmapi1 php_set_vhost_versions version=inherit vhost-0=$i;done
    

    Tis command will set all web sites to use inherit PHP.

    To set all site to use alt-PHP 7.4, run

    selectorctl --change-to-version=7.4 --version=native
    

    This will change PHP version for all sites that use native PHP to alt-PHP 7.4

    Or you can use

    cd /var/cpanel/users
    ls -1 | awk '{ print "selectorctl --set-user-current=7.4 --user="$1 }' | sh
    

    See cloudlinux

  • CageFS command not working for user

    I have flvtool2 installed on the server. Path to binary file location was added in file /etc/cagefs/conf.d/vshare.cfg

    [root@server22 ~]# cat /etc/cagefs/conf.d/vshare.cfg 
    [vshare]
    comment=vShare Youtube Clone Requirements
    paths=/usr/bin/ffmpeg, /usr/bin/mencoder, /usr/bin/mplayer, /usr/bin/flvtool2, /usr/bin/lame, /usr/bin/yamdi, /usr/bin/qt-faststart, /usr/bin/MP4Box, /usr/bin/mediainfo, /usr/bin/neroAacEnc
    [root@server22 ~]# 
    

    The binary program works properly when running as root, but it fail when switching to a user that use CageFS.

    [root@server22 ~]# /usr/bin/flvtool2 -V
    FLVTool2 1.0.6
    [root@server22 ~]# su - socialwe
    Last login: Thu May 28 06:33:33 UTC 2020 on pts/0
    [socialwe@server22 ~]$ /usr/bin/flvtool2 -V
    :1:in `require': cannot load such file -- rubygems.rb (LoadError)
    from :1:in `'
    [socialwe@server22 ~]$
    

    The problem is fixed by editing file /etc/cagefs/cagefs.mp

    vi /etc/cagefs/cagefs.mp
    

    Add following lines

    !/usr/lib64/ruby/
    !/usr/share/rubygems/
    !/usr/share/ruby/
    !/usr/local/share/ruby/
    

    Now remount cagefs with

    cagefsctl --remount-all
    

    See cagefs

  • CloudLinux PHP versions missing in PHP Selector

    CloudLinux PHP versions missing in PHP Selector

    On a Cpanel server running CloudLinux, PHP Selector did not show all PHP versions.

    cloudlinux php selector

    I reinstalled EasyApache profile “CloudLinux + All PHP Options + OpCache + mod_lsapi”.

    WHM EasyApache 4  PHP missing

    Even after installing EasyApache profile with all PHP versions, PHP 7.2 and PHP 7.4 was missing on this server.

    To fix, the problem, i run

    yum clean all
    yum install -y alt-php72* 
    yum install -y alt-php74*
    yum install -y alt-php73*
    
  • CloudLinux PHP Selector on Cpanel Server

    CloudLinux come with PHP Selector, this allow you to select differnt PHP versions. When you enable PHP selector, you should do the following.

    1) EasyApache 4 and bild profile "CloudLinux + All PHP Options + OpCache + mod_lsapi".
    2) MultiPHP Manager > System PHP Version set to any ea-php Version
    3) MultiPHP Manager > System PHP-FPM click "Turn Off" button.
    4) MultiPHP Manager > set INHERIT php version for domain.
    5) Users PHP selector > choose needed alt-php version and modules.
    6) WHM > Feature Manager > default => disable MultiPHP Manager and MultiPHP INI Editor.
    

    Related Posts

    Enable CloudLinux PHP lsapi
    CloudLinux

  • KernelCare Unknown Kernel

    On Cpanel server with KernelCare installed, i keep getting email

    KernelCare

    This is because the kernel is not yet supported by kernalcare. Since this kernal is provided by CloudLinux, you don’t have to worry. CloudLinux support said they do add support for KernelCare after 3 to 4 days of releasing new kernel.

    To disable this warning, edit file

    vi /etc/sysconfig/kcare/kcare.conf
    

    Add

    IGNORE_UNKNOWN_KERNEL=True
    

    You can find more KernelCare options at

    https://docs.kernelcare.com/config-options/

    You can always check if KernelCare supports your current kernel here:

    http://patches.kernelcare.com/

    KernelCare update kernel using cronjob in /etc/cron.d/kcare-cron

    [root@ok cron.d]# cat kcare-cron 
    31 */4  * * * root /usr/bin/kcarectl -q --auto-update
    [root@ok cron.d]# 
    

    Related Posts

    Install KernelCare
    cloudlinux

  • imunify360

    imunify360

    Imunify360 is paid version of Imunify. It provides additional protection like Web Application Firewall, Real-time protection, and automated malware cleaning.

    Update license

    REG_KEY=XXXXX imunify360-agent register

    If you have IP based license, use

    imunify360-agent register
  • Convert CentOS to CloudLinux

    cloudlinux

    CloudLinux is a popular Linux distribution used by shared hosting providers. Some of the advantages of cloudlinux is users are running inside its own light weight virtual environment (CageFS). This will protect other sites on the server if one of the sites gets hacked. Also, CloudLinux allows you to set resource limits for each site, this way no one site can take down the entire web server.

    You can find more details on cloudlinux at the official website

    https://cloudlinux.com

    If you are using CentOS on your server, you can easily convert it to CloudLInux.

    To convert CentOS to CloudLinux, run

    wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
    sh cldeploy -k LICENSE_KEY_HERE

    You can get an activation key by getting 30 day trail or purchasing a CloudLinux license.

    If you have IP based license, run

    wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy
    sh cldeploy -i

    Once install completed, reboot the server to get the server booted with CloudLinux kernel.

    reboot

    See cloudlinux

  • cagefs mount points exists

    On WHM > CloudLinux LVE Manager, i get following warning

    Check cagefs mount points exists

    There are missing mount points: [‘/usr/local/cpanel/whostmgr/docroot/cgi/softaculous’]

    This error is due to softaculous was removed from server, but was not removed from cagefs mount points file.

    To fix this error, edit file

    vi /etc/cafefs/cagefs.mp
    

    Remove the line

    /usr/local/cpanel/whostmgr/docroot/cgi/softaculous
    
  • Enable CloudLinux PHP lsapi

    Enable CloudLinux PHP lsapi

    CloudLinux provides high performance PHP module lsapi. It is a replacement for suphp available on cpanel servers. lsapi module is a based on LiteSpeed Technologies API for PHP.

    To enable lsapi in CloudLinux Cpanel Server, go to

    WHM > EasyApache 4

    Provision profile

    CloudLinux + All PHP Options + OpCache + mod_lsapi
    CloudLinux lasapi php

    Click “Provision” and wait until the software is updated.

    Now you need to set lsapi as default PHP handler. To do this, go to

    WHM > MultiPHP Manager
    
    WHM Multi PHP Manager

    Click on “PHP Handlers”.

    On Next page, you can set handler for each PHP versions.

    You can set PHP handler to lsapi gloabally using following command

    /usr/bin/switch_mod_lsapi --enable-global
    

    Once you run it, all PHP version handlers will get chanegd to lsapi.

    If you check PHP info, you will see Server API listed as LiteSpeed.

    LiteSpeed Server API

    Back to lsapi