0

Linux CentOS 安装 Zend Guard Loader 组件

在 Zend 官网上找到 Zend Guard Loader 的下载(), 找到 Linux 版本的 Zend Guard Loader, 点击下载, 需要登录, 登录后会弹出下载提示, 开始下载, 复制实际下载地址, 用 wget 下载.
[cc lang="php"]
yum install wget
wget https://downloads.zend.com/guard/6.0.0/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz
[/cc]
解压下载的文件
[cc lang="php"]
tar zxvf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz
[/cc]
进入 ZendGuardLoader 目录, 查看 README 文档, 按照说明进行安装.
[cc lang="php"]
cd ZendGuardLoader-php-5.4-linux-glibc23-i386
cat README.txt
[/cc]
开始安装
复制 php-5.4.x 文件夹下的 ZendGuardLoader.so 到 /usr/lib/httpd/modules 目录或 /etc/httpd/modules 目录, 这两个目录其实是同一个位置.
[cc lang="php"]
cp ZendGuardLoader.so /usr/lib/httpd/modules
[/cc]
编辑 php配置文件.
[cc lang="php"]
vi /etc/php.ini
[/cc]
在 php.ini 文件末尾添加几行配置项.
[cc lang="php"]
zend_extension=/usr/lib/httpd/modules/ZendGuardLoader.so
zend_loader.enable=1
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3
[/cc]
重启 Apache 或 Nginx
[cc lang="php"]
service httpd restart
service nginx restart
service php-fpm restart
[/cc]
用浏览器打开 phpinfo.php 页面, 在 php 项最下面看到如图所示即完装成功.