CentOS 安装 Zend Guard Loader

说明:PHP5.3以上的版本不再支持Zend Optimizer,已经被全新的 Zend Guard Loader 取代,下面是安装Zend Guard具体步骤,以下操作均在终端命令行执行

在 Zend 官网上找到 Zend Guard Loader 的下载页, 找到 Linux 版本的 Zend Guard Loader, 点击下载, 需要登录, 登录后会弹出下载提示, 开始下载, 复制实际下载地址, 用 wget 下载.

1.下载Zend Guardcd /home
       wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz    #32位
       wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz  #64位

2.安装Zend Guard
       mkdir /usr/zend       #建立Zend Guard安装目录
       tar xvfz ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz    #解压安装文件
       cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ZendGuardLoader.so     /usr/zend/   #拷贝文件到安装目录
       rm -rf /home/ZendGuardLoader-php-5.3-linux-glibc23-i386*   #删除安装包

3.配置Zend Guard
       cp  /etc/php.ini    /etc/php.inibak   #修改之前先备份
       vi /etc/php.ini    #编辑文件
       在最后位置添加以下内容
        [Zend Guard]
        zend_extension=/usr/zend/ZendGuardLoader.so
        zend_loader.enable=1
        zend_loader.disable_licensing=0
        zend_loader.obfuscation_level_support=3
        zend_loader.license_path=

4、重启web服务器
       /etc/init.d/httpd restart
至此,Zend Guard安装完成。

yum install wget

wget http://downloads.zend.com/guard/6.0.0/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz
解压下载的文件
tar zxvf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz
 
进入 ZendGuardLoader 目录, 查看 README 文档, 按照说明进行安装.
cd ZendGuardLoader-php-5.4-linux-glibc23-i386
cat README.txt
开始安装
复制 php-5.4.x 文件夹下的 ZendGuardLoader.so 到 /usr/lib/httpd/modules 目录或 /etc/httpd/modules 目录, 这两个目录其实是同一个位置.
cp ZendGuardLoader.so /usr/lib/httpd/modules
 
编辑 php配置文件.
vi /etc/php.ini
在 php.ini 文件末尾添加几行配置项.
zend_extension=/usr/lib/httpd/modules/ZendGuardLoader.so
zend_loader.enable=1
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3
重启 Apache 或 Nginx
service httpd restart
 
service nginx restart
service php-fpm restart
 
原文地址:https://www.cnblogs.com/Beyron/p/6213635.html