How to install zend optimizer in Centos 7

Introduction

Zend Optimizer is a free application that allows PHP to run files encoded by Zend Guard. Zend Optimizer greatly enhances the performance of PHP applications.
The Zend Optimizer goes over the code generated by the standard Zend run-time compiler and optimizes it for faster execution. The standard Zend run-time compiler used by PHP is indeed very fast, generating code that is usually 2 to 10 times faster. But an application that uses Zend Optimizer can execute scripts another 40% to 100% faster.

Requirement

The following are the software requirement for this installation.

  • Operating System : Centos 7/64bit
  • Web server : Apache 2.4
  • PHP version : 5.4
  • Databae : MariaDB 5.5

You should have a dedicated or VPS centos server with LAMP or LEMP stack.

Install Zend Optimizer

Zend Guard optimization depends on both operating system (64/32 bit) and Php version of the server.

Before starting optimization check the current version of the PHP running in the server.

# arch
x86_64

# php -v
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Now we can download the appropriate Zend Guard package for the operating system (centos7/64 bit) and PHP version (PHP 5.4) on the server.

Zend Guard Loader (Runtime for PHP 5.4) 64-bit:

# cd /usr/local/src
# wget http://downloads.zend.com/guard/6.0.0/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz

Extract the down loaded package by using tar (tape Archeive)command:

[root@arunima-centos7 src]# tar xzvf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz
ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64/
ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64/php-5.4.x/
ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so
ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64/README.txt
[root@arunima-centos7 src]# cd ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64/

The new folder extracted contains ZendGuardLoader.so file and copy it to /etc/php.d/ZendGuard.ini. See example below (use cd command)

# cd php-5.4.x
[root@arunima-centos7 php-5.4.x]# ll
total 1044
-rwxrwxrwx 1 894 nobody 1068334 May  8  2013 ZendGuardLoader.so

# cp ZendGuardLoader.so /usr/lib64/php/modules

Now create ZendGuard.ini file inside /etc/php.d directory:

# vi /etc/php.d/ZendGuard.ini

Server is 64-bit then add below lines to the file /etc/php.d/ZendGuard.ini

; Enable Zend Guard extension
zend_extension=/usr/lib64/php/modules/ZendGuardLoader.so
zend_loader.enable=1

Restart apache service to update changes

# systemctl restart httpd.service

Now check it bye using php -v you can see that php is optimized with zend guard

[root@arunima-centos7 modules]# php -v
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies

Conclusion

Thus we have optimized our php scripts with apache in simple steps.
Note: In case of 32-bit server: zend_extension wil be /usr/lib/php/modules/ZendGuardLoader.so .

Subscribe Now

10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!

Archive Calendar

Sat Sun Mon Tue Wed Thu Fri
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Over 20000 Satisfied Customers!

From 24/7 support that acts as your extended team to incredibly fast website performance

Zelt staff were fantastic, I had a concern with a domain and they got back to me very quickly and they helped me to resolve the issue!

author
Technician, Diageo PLC

I'm using Zelt for my portfolio since 2006. The transition was seamless, the support was immediate, and everything works perfectly.

author
Photographer, Allister Freeman

Very easy to understand & use even though I am not very technologically minded. No complications whatsoever & I wouldn't hesitate to recommend it to all.

author
Actor, A&J Artists

Zelt support team have been amazingly responsive and helpful to any of my queries, thank you so much to the Zelt have been amazingly responsive and helpful to any of my queries ๐Ÿ‘๐Ÿ‘๐Ÿ‘

author
Technician, Diageo PLC

Anytime I've had a problem I can't solve, I've found Zelt to be diligent and persistent. They simply won't let an issue go until the client is happy.

author
Doctor, SmartClinics

Zelt support team have been amazingly responsive and helpful to any of my queries, thank you so much to the Zelt have been amazingly responsive and helpful to any of my queries ๐Ÿ‘๐Ÿ‘๐Ÿ‘

author
Freelancer, Fiverr

24/7 World-Class Support

Ran into trouble? Contact our Customer Success team any time via live chat or email.

  • Receive professional WordPress support
  • Our specialists are available round
Get Support