CentrioHost Blog

Stories and News from IT Industry, Reviews & Tips | Technology Blog


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

SatSunMonTueWedThuFri
 1
2345678
9101112131415
16171819202122
23242526272829
30 

Over 20000 Satisfied Customers!

  • web hosting reviewer
    Valerie Quinn
    CTO, Acteon Group

    Centriohost 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! ~ . . . Read more

  • Joomla hosting reviewer
    Collin Bryan
    Photographer, Allister Freeman

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

  • dedicated server reviewer
    Harry Collett
    Actor, A&J Artists

    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. ~ . . . Read more

  • vps web hosting reviewer
    Porfirio Santos
    Technician, Diageo PLC

    Centrio support team have been amazingly responsive and helpful to any of my queries, thank you so much to the Centriohost have been amazingly responsive and helpful to any of my queries ๐Ÿ‘๐Ÿ‘๐Ÿ‘ ~ . . . Read more

  • wordpress hosting plans reviewer
    Catherine Auer
    Doctor, SmartClinics

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

  • reseller hosting reviewer
    Effectivo Social
    Freelancer, Fiverr

    Recommend their shared hosting for all my SME web design clients. Their cloud or VME offerings are too great to deal with. Pricing is perfect and suitable for all users (อ โ‰– อœส–อ โ‰–) ๐Ÿ‘Œ ~ . . . Read more

Top