Main menu


In this article we will see how to install Zend Optimizer with Zen Guard Loader on CentOS or Red Hat system running LAMP stack. Zend Guard loader is a free run time library enable PHP to run script encoded by Zend Gard.

  1. Download Zend Optimizer on CentOS
  2. Extract and copy Zend Optimizer library on PHP modules directory
  3. Configure and enable through php.ini
  4. Restart Apache Server
  5. Verify Zend Optimizer is successfully installed.

Check your PHP version and download Zend Optimizer for Linux according your PHP version and CPU (32bit or 64bit)

[root@sector19 ~]# php -v
 PHP 5.4.17 (cli) (built: Jan 7 2014 08:49:48)
 Copyright (c) 1997-2010 The PHP Group

For PHP 5.4

For PHP 5.4

Copy URL and use wget command in Linux terminal to download package.

[root@sector19 ~]# wget
HTTP request sent, awaiting response... 200 OK
Length: 426278 (416K) [application/x-gzip]
Saving to: âZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gzâ

100%[======================================>] 426,278 309KB/s in 1.3s

2015-02-03 19:31:58 (309 KB/s) - âZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gzâ saved [426278/426278]

Extract and copy your Zend Optimizer library in PHP modules

[root@sector19 ~]# tar -zxvf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz
[root@sector19 ~]# cp /usr/lib64/php/modules

Enable module in PHP

Open your php.ini file

[root@sector19 ~]# vi /etc/php.ini

Append this text at the end of file.


Restart your Apache Server

For CentOS and RHEL 5 and 6.

[root@sector19 ~]# service httpd restart

For CentOS7 or RHEL7

[root@sector19 ~]# systemctl restart httpd.service

Verify that Zend Optimizer is sucessfuly installed on your Linux Box.

[root@sector19 ~]# php -m
 [Zend Modules]
 Zend Optimizer

You will see something like this at the end of result. This means Zend Optimizer is successfully installed on Your Linux Box.