This is the guide to install ioncube on ubuntu server.
Create a temp directory or moving into one already created
Get 32 bit ioncube to download. You can decide which type of OS is installed on your server.
You can get 64 bit ioncube to download.
Now unzip the download file.
Move the code to another location
Add the zend extension in php (nano /etc/php5/apache2/php.ini). Below command version should be changed based on the php version installed on server.
Now restart the apache to get it working