Simple steps to install eAccelerator on cPanel server – Command-line option
What is eAccelerator ?
Yes, before going directly to the installation steps, you must have an idea about eAccelerator. As the name indicates, it’s an accelerator for PHP scripts/files on your website. It’s an open source software which is used to increase the loading speed of PHP pages.
eAccelerator is a PHP accelerator derived from the MMCache extension for the PHP programming language. eAccelerator provides a bytecode cache. eAccelerator is open source and thereby free to use and distribute. Old and unmaintained versions also provided an encoder.
Every time a PHP script is accessed, PHP usually parses and compiles scripts to bytecode. Once installed, eAccelerator optimizes the compiled bytecode and caches this to shared memory or disk or both. Upon subsequent accesses to a script, eAccelerator will access cached bytecode if it is available instead of the script being compiled. This avoids the performance overhead of repeated parsing and compilation.
So we can conclude, the eAccelerator helps to improve performance by re-using compiled PHP scripts and optimizing them to speed up their execution.
Supporting PHP versions
This caching feature only supports upto PHP version 5.4. It does not support for 5.5 and 5.6
Installation of eAccelerator on a cPanel server using phpextensionmgr script
Like the installation of Ioncube loader extension, we can use the phpextensionmgr to install the eAccelerator on cPanel server.
Step I : Login to server as root.
Step II : Run the below pasted script:
/scripts/phpextensionmgr install EAccelerator
Un-installation of eAccelerator
/scripts/phpextensionmgr uninstall EAccelerator
How/Command to check whether eAccelerator is installed or not on a cPanel server ?
It’s very simple to check if eAccelerator is installed or not on the server. You can use the command “php -v” to check it from your server commandline 🙂
See the example below:
[email protected] [~]# php -v PHP 5.4.26 (cli) (built: Mar 14 2014 02:39:49) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies with eAccelerator v0.9.6.1-ea, Copyright (c) 2004-2012 eAccelerator, by eAccelerator
Installing eAccelerator from its source code.
This method is very helpful to install eAccelerator in a server which hasn’t cPanel. You can download latest version from HERE.
Please do follow the below pasted steps to install eAccelerator from its source file.
wget http://downloads.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%18.104.22.168/eaccelerator-0.9.6.1.zip unzip eaccelerator-0.9.6.1.zip cd eaccelerator-0.9.6.1 phpize ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/bin/php-config make make install
Make sure that the eaccelerator.so file available on extensions directory after the eAccelerator installation.
Add the following lines at the end of php.ini
Restart Apache web-server.
service httpd restart
That’s it 🙂
Managing PHP extensions (cPanel)
How to install IonCube loader under a cPanel server.
How to install IonCube loader on server.
Easy way to install Memcached and memcache in a cPanel server