Bài viết sẽ hướng dẫn cách cài đặt Zend Guard Loader và Ioncube cho php 5.3 trên Direct Admin.

- Trước khi cài đặt kiểm tra phiên bản php hiện tại đã hỗ trợ  zend hoặc ioncube  hay chưa bằng lệnh sau, nếu nhận được kết quả như bên dưới có nghĩa là Zend Guard Loader và Ioncube chưa được cài.

[root@vps ~]# php -v
PHP 5.3.29 (cli) (built: Sep 28 2015 23:27:30)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
- Để bắt đầu cài đặt các ta cần thực hiện theo các bước sau:

1- Cài đặt Ioncube 

- Đi tới thư mục directadmin.

cd /usr/local/directadmin/custombuild

- Trước khi cài đặt ioncube, cần phép sử dụng ioncube với câu lệnh sau:

[root@vps custombuild]# ./build set ioncube yes Changed ioncube option from no to yes

Chạy cài đặt
[root@vps custombuild]# ./build ioncube
Và kết quả thông báo khi cài đặt thành công

Downloading ioncube_loaders_lin_x86-64.tar.gz... --2015-10-02 11:43:08-- http://files14.directadmin.com/services/custombuild/ioncube_loaders_lin_x86-64.tar.gz Resolving files14.directadmin.com... 125.253.119.8 Connecting to files14.directadmin.com|125.253.119.8|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 7737839 (7.4M) [application/octet-stream] Saving to: `/usr/local/directadmin/custombuild/ioncube_loaders_lin_x86-64.tar.gz' 100%[=======================================================================================================>] 7,737,839 4.90M/s in 1.5s 2015-10-02 11:43:10 (4.90 MB/s) - `/usr/local/directadmin/custombuild/ioncube_loaders_lin_x86-64.tar.gz' saved [7737839/7737839] ionCube loader has been installed

2- Cài đặt Zend Guard Loader. 

- Di chuyển tới thư mục cài đặt và thực hiện cho phép cài đặt sử dụng Zend Guard Loader 
[root@vps ~]# cd /usr/local/directadmin/custombuild
[root@vps custombuild]# ./build set zend yes
Changed zend option from no to yes
- Cài đặt zend, và chờ hoàn thành sẽ nhận được kết quả nhận báo cài đặt thành công:
[root@vps custombuild]# ./build zend
Downloading ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz...
--2015-10-02 11:37:51-- http://files14.directadmin.com/services/custombuild/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
Resolving files14.directadmin.com... 125.253.119.8
Connecting to files14.directadmin.com|125.253.119.8|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 434691 (425K) [application/octet-stream]
Saving to: `/usr/local/directadmin/custombuild/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz'

100%[=======================================================================================================>] 434,691 1.65M/s in 0.3s

2015-10-02 11:37:51 (1.65 MB/s) - `/usr/local/directadmin/custombuild/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz' saved [434691/434691]

Zend Guard Loader has been installed.

3- Thực hiện kiểm tra lại kết quả

- Thực hiện kiểm tra sau khi cài đặt bằng lệnh
[root@vps ~]# php -v
- Và có kết quả như sau:
PHP 5.3.29 (cli) (built: Sep 28 2015 23:27:30)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.17, Copyright (c) 2002-2015, by ionCube Ltd.
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies
 
Chúc bạn thực hiện thành công !