installing zend optimizer on linux CentOS

Summary: In this article i tried to explain how to install zend optimizer on linux CentOS-6. The purpose to post this article here is to resolve the issue zend optimizer dependency on current system architectures. Some time we build our application on current state of technology and after some time the current version absolute due to some shortcoming and new features. That time its really difficult to maintain the application. If the applications support the updated version of all the dependent applications then its pretty much easy to upgrade the application to new version but, if there are some working modules of the current system not supported by the latest applications then, we have to manually compile the old version for our current system on updated versions of OS. One of the example is Zend Optimizer required for shopeware-3.5 which are not supported by php-5.3.x any more. I have compile it on the updated OS with php-5.2.17.

To install php-5.2.17 on CentOS-6.2 and configure Zend optimizer follow the procedure carefully.
Step-1: Login to your server

ssh user@sever
password:

Step-2: Now download all the required extensions of php to a specific directory to complie and install on your server. I am downloading it into /usr/scr/ directory. You can select your own.

Cd /usr/src
wget http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/
php-5.2.17-1.el6.art.x86_64.rpm
php-bcmath-5.2.17-1.el6.art.x86_64.rpm
php-cli-5.2.17-1.el6.art.x86_64.rpm
php-common-5.2.17-1.el6.art.x86_64.rpm
php-dba-5.2.17-1.el6.art.x86_64.rpm
php-devel-5.2.17-1.el6.art.x86_64.rpm
php-embedded-5.2.17-1.el6.art.x86_64.rpm
php-gd-5.2.17-1.el6.art.x86_64.rpm
php-imap-5.2.17-1.el6.art.x86_64.rpm
php-ldap-5.2.17-1.el6.art.x86_64.rpm
php-mbstring-5.2.17-1.el6.art.x86_64.rpm
php-mcrypt-5.2.17-1.el6.art.x86_64.rpm
php-mhash-5.2.17-1.el6.art.x86_64.rpm
php-mssql-5.2.17-1.el6.art.x86_64.rpm
php-mysql-5.2.17-1.el6.art.x86_64.rpm
php-pdo-5.2.17-1.el6.art.x86_64.rpm
php-soap-5.2.17-1.el6.art.x86_64.rpm

Step-2: Now install the rpm

rpm -ivh –nodeps php-5.2.17-1.el6.art.x86_64.rpm
php-bcmath-5.2.17-1.el6.art.x86_64.rpm
php-cli-5.2.17-1.el6.art.x86_64.rpm
php-common-5.2.17-1.el6.art.x86_64.rpm
php-dba-5.2.17-1.el6.art.x86_64.rpm
php-devel-5.2.17-1.el6.art.x86_64.rpm
php-embedded-5.2.17-1.el6.art.x86_64.rpm
php-gd-5.2.17-1.el6.art.x86_64.rpm
php-imap-5.2.17-1.el6.art.x86_64.rpm
php-ldap-5.2.17-1.el6.art.x86_64.rpm
php-mbstring-5.2.17-1.el6.art.x86_64.rpm
php-mcrypt-5.2.17-1.el6.art.x86_64.rpm
php-mhash-5.2.17-1.el6.art.x86_64.rpm
php-mssql-5.2.17-1.el6.art.x86_64.rpm
php-mysql-5.2.17-1.el6.art.x86_64.rpm
php-pdo-5.2.17-1.el6.art.x86_64.rpm
php-soap-5.2.17-1.el6.art.x86_64.rpm

…………………………………………….
Step-4: Restart Your webserver

/etc/init.d/httpd restart
stoping httpd ok
starting httpd ok

Step-5: Now Limit the Php not be upgraded when we updating or upgrading our server.

vim /etc/yum.conf
exclude=php*

Step-6: Now lets do the Zendoptimizer installation and configuration now.

wget http://www.zend.com/products/guard/downloads
zindoptimizer 3.3(php-2.5.x linux)

Extract the Zend Optimizer package.
tar -zxvf zedoptimizer-3.3-tar.gz

Locate the ZendOptimizer.so (Unix) or ZendOptimizer.dll (Windows) file in the directory which
corresponds to your version of PHP (4.3.x, 4.4.x, 5.0.x, 5.1.x, 5.2.x).

Step-7: Add the following line to your php.ini file:

Linux and Mac OS X: zend_extension=<full_path_to_ZendOptimizer.so>
Windows: zend_extension_ts=<full_path_to_ZendOptimizer.dll>
Windows non-thread safe: zend_extension=<full_path_to_ZendOptimizer.dll>
(*) The Windows non-thread safe binary is only used with Zend Core 2.0.

As we are using Linux we have to do like this.

vim /etc/php.ini
zend_extension=<full_path_to_ZendOptimizer.so>

Step-8: Check the php version

php -v

Step-9: reboot the server.

reboot -n

Now you can enjoy your application on the new OS.

Leave a Reply

Your email address will not be published. Required fields are marked *