How to install CWP (CentOS Web Panel)
CentOS Web Panel and its features are described on the official website: http://centos-webpanel.com/features
The installation is straightforward:
cd /usr/local/src wget http://dl1.centos-webpanel.com/files/cwp-latest.sh sh cwp-latest.sh
During the install, it builds Apache and PHP from sources. To make PHP Selector work we need to build
patched suPHP: - download/unpack suPHP (0.7.1 as an example):
cd /usr/local/src/ wget http://www.suphp.org/download/suphp-0.7.1.tar.gz cd suphp-0.7.1
- download/unpack our patches:
wget http://repo.cloudlinux.com/cloudlinux/sources/da/cl-apache-patches.tar.gz tar xfz cl-apache-patches.tar.gz
- apply our patch:
patch -p1 < suphp-0.7.1-cagefs.patch
- if apache 2.4 is used - modify configure file to adopt suPHP sources for it, open a file:
vi configure
find section
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
and modify the second line as follows:
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
When done check if suPHP binary has necessary code, the output should be following:
strings /usr/local/sbin/suphp | grep jail
lve_jail_uid CageFS jail error
And change (create) /etc/cl.selector/native.conf to looks this way:
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