Quickly Setting Up a Server with CentOS 6, ISPManager, and FastCGI
Learn how to set up a CentOS 6 server with ISPManager and FastCGI, streamlining your web hosting environment for optimal performance.
Quickly Setting Up a Server with CentOS 6, ISPManager, and FastCGI
We use this sequence of actions literally every day—CentOS is a very popular distribution, and we usually recommend it.
Initial Setup
After installation, we have a clean operating system with a basic set of applications. First, we disable SELinux:
# Edit /etc/selinux/config and set SELINUX=disabled
Then reboot the server. If you prefer not to reboot, you can disable SELinux from the command line:
setenforce 0
Enable Atomic Repository and Install Software
We enable the Atomic repository and install the necessary software (PHP 5.3, etc.; unnecessary packages can be skipped or disabled later):
# It’s better to execute one command at a time
wget -q -O - http://www.atomicorp.com/installers/atomic | sh
wget -q -O /tmp/install.sh http://download.ispsystem.com/install.sh
sh /tmp/install.sh
yum -y install php-eaccelerator
yum -y install php-ioncube-loader
yum -y install mod_fcgid
yum -y install php-xml
/usr/local/ispmgr/sbin/pkgctl cache
Adjust PHP and Apache Configuration for FastCGI
If FastCGI will be used, adjust php.ini, create a symlink, and modify Apache’s configuration:
echo 'cgi.fix_pathinfo = 1' >> /etc/php.ini
ln -s /etc/php.ini /etc/php.d/php.ini
sed -i 's/^LoadModule/# LoadModule/g' /etc/httpd/conf.d/fcgid.conf
Add the following lines to /etc/httpd/conf/httpd.conf somewhere after loading mod_version.o:
LoadModule fcgid_module modules/mod_fcgid.so
AddHandler fcgid-script fcg fcgi fpl
FcgidIPCDir /var/run/mod_fcgid
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm
FcgidIOTimeout 30
FcgidMaxProcesses 100
FcgidMaxProcessesPerClass 30
FcgidIdleTimeout 30
FcgidMinProcessesPerClass 2
FcgidMaxRequestsPerProcess 500
FcgidProcessLifeTime 600
FcgidMaxRequestLen 15728640
MaxRequestLen 15728640
Set Permissions for eAccelerator Disk Caching
In case disk caching is used in eAccelerator, set the permissions:
chmod 777 /var/cache/php-eaccelerator
Adjust Permissions for Nginx Frontend
If Nginx will be used as a frontend, change the permissions on the home directory so that static files are served without errors (403):
chmod 755 /usr/local/ispmgr/etc/www.skel
Need Help?
Our support team is available 24/7 to assist you with any questions or issues.
Contact Support