How to install ioncube on jump server?
How to install ioncube on jumpserver or bastion host?
You would need root access to the server
1. Download the latest ioncube version from the site
You would need to identify your system architecture whether its 32 or 64 bit.
The following command would help you with it.
[[email protected]~]# file /bin/ping
/bin/ping: setuid ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, stripped
As you can see, its 64 bit architecture.
Download the ioncube package for 64 bit and untar it /usr/local/ioncube
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -zxf ioncube_loaders_lin_x86-64.tar.gz && mv ioncube /usr/local
2.Identify the php version your are running
[ [email protected] ~]# php -v
PHP 5.3.3 (cli) (built: Aug 6 2014 11:41:05)
3. Edit the php configuration file & Add corresponding ioncube loader
For Centos 7
[[email protected]]# vi /etc/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.4.so
[[email protected]]# systemctl restart httpd
Centos 7 Nginx
[[email protected]]# vi /etc/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.3.so
[[email protected]]# systemctl restart nginx
For Centos 8
[[email protected]]# vi /etc/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.2.so
[[email protected]]# systemctl restart httpd
For RHEL 8
[[email protected]]# vi /etc/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.2.so
[[email protected]]# systemctl restart httpd
For Ubuntu 16
[email protected] :~# vi /etc/php/7.0/cli/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so
[email protected]y:~# vi /etc/php/7.0/apache2/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so
[email protected]:~# apachectl restart
For Ubuntu 18
For Ubuntu 20
[email protected] :~# vi /etc/php/7.4/cli/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so
[email protected]:~# vi /etc/php/7.4/apache2/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so
[email protected]:~# apachectl restart
For Ubuntu 22
[email protected] :~# vi /etc/php/8.1/cli/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_8.1.so
[email protected]:~# vi /etc/php/8.1/apache2/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_8.1.so
[email protected]:~# apachectl restart
For Debian 9
[email protected] :~# vi /etc/php/7.0/cli/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so
[email protected]:~# vi /etc/php/7.0/apache2/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so
[email protected]:~# apachectl restart
[email protected] :~# vi /etc/php/7.3/cli/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.3.so
[email protected]:~# vi /etc/php/7.3/apache2/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.3.so
[email protected]:~# apachectl restart
[email protected] :~# vi /etc/php/7.0/cli/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so
[email protected]:~# vi /etc/php/7.0/fpm/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so
[email protected]:~# systemctl reload nginx.service
[email protected]:~# systemctl reload php7.0-fpm.service
[ [email protected] ~]# php -v
PHP 5.3.3 (cli) (built: Aug 6 2014 11:41:05)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.4.0, Copyright (c) 2002-2013, by ionCube Ltd.