The CentOS Web Panel (CWP) is an open-source server tool with a powerful control panel that simplifies server management. Known for its automation features and long-term release cycles, CentOS makes managing users and servers more efficient and secure, making it a popular choice for businesses.
As a server management provider, we often receive questions about installing and configuring the CWP web panel. This article will guide you through installing CentOS Web Panel and setting it up with the PHP Selector.
Before diving into the installation process, let’s take a look at some of the top features of the CentOS Web Panel.
More stable than other free Linux distributions
Strong community support
Reliable and fast performance
Easy migration from cPanel and live monitoring
User-friendly interface
Using CWP, you can manage various features of a CentOS server, such as the web server, PHP, user management, security, email, MySQL, system settings, and DNS.
To install CentOS Web Panel, your server needs to meet these requirements:
Updated CentOS server version
Minimum RAM: 512 MB for 32-bit servers, 1024 MB for 64-bit servers
At least 10 GB of free disk space
A static IP address
Installing CentOS Web Panel (CWP) is straightforward and can be done manually. Here’s a step-by-step guide:
Navigate to the source directory:
cd /usr/local/src
Download the latest CWP installer:
wget http://dl1.centos-webpanel.com/files/cwp-latest.sh
Run the installer:
sh cwp-latest.sh
To enable the PHP Selector feature, you need to build a patched version of suPHP:
Download and unpack suPHP:
cd /usr/local/src/
wget http://www.suphp.org/download/suphp-0.7.1.tar.gz
tar -xvzf suphp-0.7.1.tar.gz
cd suphp-0.7.1
Download the required patches:
wget http://repo.cloudlinux.com/cloudlinux/sources/da/cl-apache-patches.tar.gz
tar xfz cl-apache-patches.tar.gz
Apply the patch:
patch -p1 < suphp-0.7.1-cagefs.patch
Open the configure file:
vi configure
Locate the following code snippet:
major_version=`echo $APACHE_VERSION|cut -f1,2 -d.`
if test “$major_version” = “2.0” -o “$major_version” = “2.2”; then
APACHE_VERSION_2=true
APACHE_VERSION_1_3=false
else
APACHE_VERSION_2=false
APACHE_VERSION_1_3=true
fi
Modify the if test line to include support for Apache 2.4:
if test “$major_version” = “2.0” -o “$major_version” = “2.2” -o “$major_version” = “2.4”; then
Build suPHP:
./configure --with-apr=/usr/local/apr/ --with-apxs=/usr/local/apache/bin/apxs --with-setid-mode=paranoid --with-apache-user=nobody --with-gnu-ld --disable-checkpath --sysconfdir=/usr/local/etc --sbindir=/usr/local/sbin
make
make install
Run the following command to check if the required jail-related code exists:
Verify the installation:
strings /usr/local/sbin/suphp | grep jail
Run the following command to check if the required jail-related code exists:
Expected output:
lve_jail_uid CageFS jail error
If you don’t see this output, review the steps and fix any errors.
Edit or create the file /etc/cl.selector/native.conf and add the following lines:
php=/usr/local/bin/php-cgi
php-cli=/usr/local/bin/php
php.ini=/usr/local/php/php.ini
php-fpm=/usr/local/sbin/php-fpm
That's it! your CentOS Web Panel should be installed and configured with the PHP Selector successfully.
This article shows you how to install CentOS Web Panel and set it up with PHP Selector on your own. Even if you follow the instructions perfectly, you might still run into errors. If that happens, we are available 24/7 to help with server support services.