cPanel and LVE
Requirements for cPanel
- LVE installed (use centos2cl script available here)
- Apache 2.2.x or 1.3.x, compiled with easyapache
- mod_suexec should be enabled
- Apache should be configured with MPM Prefork, Worker or Event
- wget and yum should be installed
Important: httpd.conf doesn't change often in CPanel. Most of the changes that are done via cPanel GUI go into php.conf, pre_virtualhost_*.conf, post_virtualhost_*.conf. The httpd.conf is usually changed only during Apache re-compile. If there is a need to do changes in httpd.conf:http://twiki.cpanel.net/twiki/bin/view/EasyApache3/OutsideVHost in httpd.conf (not recommended) look at additional recommendations
Installing CloudLinux enhancements
- mod_php
- mod_suPHP
- mod_fcgid
- MPM Worker
- MPM Event
- MPM Prefork
- mod_cgi
- mod_cgid
Install script is accessible via http://repo.cloudlinux.com/cloudlinux/sources/install-lve
Script - install-lve - has following options:
-h - help message -l - install mod_hostinglimits only -m - install mod_hostinglimits hook -r - rebuild httpd.conf (cPanel) -e - clear all LVE related changes from EasyApache, rebuild apache to get back to no LVE setup -f - force installation -d - enable debug messages -q - quiet install without info from commands yum,rpm,wget -c - install mod_fcgid module -k - install mod_fcgid hook -a - install mod_hostinglimits, mod_fcgid, rebuld httpd.conf
Parameter f cannot be given by itself. It has do be given in addition to other parameters. By default, install script does soft install. That means that if module or package is already installed, script will not re-install it. Script will only install missing components. In case where -f(force) parameter is present - script will re-install everything
Parameter -d is needed for verbose mode.
Examples:
Install everything in quiet mode, if component already install -- skip installation of the component.install-lve -adqInstall everything in quiet mode. Re-install mod_hostinglimits and mod_fcgid, if it is already installed
install-lve -adqfQuiet install
install-lve -af
Installing CloudLinux for the first time:
Execute as root:- install-lve -a
That will install mod_hostinglimits and setup a hook for cPanel, so that it would be re-compiled when apache is updated
Modules that will be installed according to Apache configuration:
- mod_hodtinglimits - Apache 2.2.x or 1.3.x, MPM Prefork
- mod_fcgid - Apache 2.2, MPM Prefork, Worker or Event
- mod_cgid - Apache 2.2, MPM Worker
| Apache 1.3 | Apache 2.2 MPM Prefork | Apache 2.2 MPM Worker or Event |
| mod_hostinglimits | mod_hostinglimits | mod_hostinglimits
mod_cgid |
| mod_fcgid | mod_fcgid |
- http://repo.cloudlinux.com/cloudlinux/sources/mod_hostinglimits.tar.gz
- http://repo.cloudlinux.com/cloudlinux/sources/mod_fcgid.tar.gz
If durring the install of the script, cmake will not be located on the system, it will be installed by the script as well.
Additional config files:- http://repo.cloudlinux.com/cloudlinux/confs/modhostinglimits.conf
- and hook files named as hook#.conf
- http://repo.cloudlinux.com/cloudlinux/confs/mod_fcgid.conf
Changes introduces by install script
Script tries to minimise changes to the system
- Install apache modules from sources, and install config templates.
- module mod_hostinglimits.so - /usr/local/apache/modules/ (/etc/httpd/modules/) (optional)
- module configuration modhostinglimits.conf - /usr/local/apache/conf/conf.d/ (/etc/httpd/conf/conf.d/) (optional)
- hook for CPanel before_httpd_restart_tests - /scripts/
- Modified templates:
- template for httpd.conf - main.default - /var/cpanel/templates/apache2/ (Added line Include "/usr/local/apache/conf/conf.d/*")
Additional recommendations
To remove changes added by install script, remove from templates that mentioned above, and execute:
/scripts/rebuildhttpdconf
Additional links
- http://twiki.cpanel.net/twiki/bin/view/DevHooks/ScriptHooks
- http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/ScriptHooks
- http://template-toolkit.org/docs/manual/index.html
Installing cPanel
# echo "CentOS release 5.5 (Final)" > /etc/redhat-release
# wget http://repo.cloudlinux.com/cloudlinux/sources/install-cpanel # sh install-cpanel