How to install CageFS on cPanel Cloudlinux Server

Installing CageFS On CloudLinux

CageFS is a virtualized file system and collection of tools that allows each user to be contained in their own ‘cage.’ Each customer will have their own completely working CageFS, complete with all system files, tools, and so on. The purpose of installing CageFS is to make the user’s account as well as the servers more secure.

 

In this article, we will see how to install CageFS on the CloudLinux environment.

 
Prerequisites
  • Apache/LiteSpeed web server
  • 7GB free disk memory
  • Kernel: CL5 with lve0.8.54 or later, CL6 with lve1.2.17.1 or later, CL7
  • 8MB per customer in /var directory
  • 5GB to 20GB in /usr/share directory
 

How to install CageFS?

1. We have to run the below commands to install CageFS on CloudLinux as root user.

yum install cagefs
/usr/sbin/cagefsctl --init
 

2. The final command will create the skeleton directory, which takes up around 7GB of disc space, so if we don’t have free disc space on /usr/share, we may use the following option to create a new temporary directory:

mkdir /home/cagefs-skeleton
ln -s /home/cagefs-skeleton /usr/share/cagefs-skeleton

Apache-mod configuration in cPanel

It is necessary to remove ea-apache24-mod_ruid2 from cPanel server, you can use command line tool or from EasyApache Configuration in WHM.

yum remove ea-apache24-mod_ruid2

and install ea-apache24-mod_suexec : 

yum install ea-apache24-mod_suexec

Install And Activate CloudLinux's PHP Selector

The alt-php packages can be installed with a single command:

yum groupinstall alt-php

You should also ensure CloudLinux's primary packages are up to date:

yum update cagefs lvemanager

Now that this has been installed, navigate to WHM's "WHM / Software / MultiPHP Manager" and ensure any users' you intend to use PHP Selector with have PHP-FPM disabled, and are configured to "inherit" the system PHP version.

Once complete, you should now have access to "Select PHP Version" in cPanel.

Hide Alt-PHP versions from cPanel's MultiPHPManager

Sometimes you don't want to see the whole list of available alt-php versions in your MultiPHP Manager. You can hide alt-php binaries from cPanel MultiPHP Manager by adjusting the /opt/alt/alt-php-config/alt-php.cfg file. The "yes" option will show the corresponding PHP version, "no" will hide one.

# vi /opt/alt/alt-php-config/alt-php.cfg
[MultiPHP Manager]
alt-php44 = no
alt-php51 = no
alt-php52 = no
alt-php53 = no
alt-php54 = no
alt-php55 = no
alt-php56 = no
alt-php70 = no
alt-php71 = no
alt-php72 = no

Once done, run

# /opt/alt/alt-php-config/multiphp_reconfigure.py

 

To apply the changes.

  • cagefs, cloudlinux cagefs, cpanel cagefs, multiphp cpanel alt-php
  • 0 Users Found This Useful
這篇文章有幫助嗎?

相關文章

How to access server via Remote Desktop (RDP)?

Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft, which provides a...

How to install Let’s Encrypt on CentOS 7 with Apache?

Today, we will show you, How to install Let’s Encrypt on CentOS 7 with Apache. Let’s Encrypt is a...

Domains are not showing in WHM -> List accounts

We were unable to see any domains listed under WHM -> List Accounts. However, we can see the...

HOW TO INSTALL LITESPEED WEB SERVER IN LINUX SERVER?

Litespeed Cache is useful to increase high performance for your Wordpress Website. Following are...

Remove ONLY_FULL_GROUP_BY in my.cnf file

Remove ONLY_FULL_GROUP_BY in my.cnf file First you need to find my.cnf file location and then...