Log in as the root user:
cd /usr/local/
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar zxvf ioncube_loaders_lin_x86-64.tar.gz
Find the location of the php.ini file and PHP version:
php -i | grep php.ini
php -v
Add the following line at the end of the php.ini file.
nano /etc/php/7.2/apache2/php.ini
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.2.so
Restart the webserver.