Welcome to CubeData's OpenNebula Blesta Documentation!

Required Prerequisites

Disabling SELinux

run the following command on either centos 6/7 depending on which version you installed(it will install sed if it isn't installed and run the command afterward):

yum -y install sed && sed -i --follow-symlinks 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux && cat /etc/sysconfig/selinux

that will disable selinux permanently though to avoid rebooting to make that change take effect do the next command:

setenforce 0

once that runs do the below command to check if it is disabled:

getenforce

if that outputs:

Permissive

you are good continue to the next step!

Installing Apache on Fresh Centos 6/7 Install

  1. first install apache by using this command:

yum -y update && yum -y install httpd

the above will update the centos 6 or 7 install first installing any updates and then will install apache afterwards

Installing Remi PHP Stack

CentOS version 7

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm

rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm

nano /etc/yum.repos.d/remi.repo

if you don't have nano use this command:

yum -y install nano

Find the line enabled =0 and change it to 1 to enable REMI repository

[...] enabled=1 [...]

enable both [remi] and the [remi] repo clause that states php 5.6 or php 7 depending on which php version you installed which can be found by doing this:

php -v

once you have those repo's marked with enabled=1 to enable the repo's press ctrl+x to exit nano and press y to save changes to the file and exit out of nano

then do this:

yum -y install php php-cli php-bcmath php-gd php-imap php-mbstring php-mcrypt php-pdo php-pear php-soap php-xml php-xmlrpc && chown -R apache:apache /var/www

then once that runs you should have the php extensions needed to run the module and interface with opennebula's native xmlrpc api the last command ensures apache can write to the directory for our licensing system.

CentOS version 6

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm

nano /etc/yum.repos.d/remi.repo

if you don't have nano use this command:

yum -y install nano

Find the line enabled =0 and change it to 1 to enable REMI repository [...] enabled=1 [...]

enable both [remi] and the [remi] repo clause that states php 5.6 or php 7 depending on which php version you installed which can be found by doing this:

php -v

once you have those repo's marked with enabled=1 to enable the repo's press ctrl+x to exit nano and press y to save changes to the file and exit out of nano

then do this:

yum -y install php php-cli php-bcmath php-gd php-imap php-mbstring php-mcrypt php-pdo php-pear php-soap php-xml php-xmlrpc && chown -R apache:apache /var/www

then once that runs you should have the php extensions needed to run the module and interface with opennebula's native xmlrpc api the last command ensures apache can write to the directory for our licensing system.

Installing IonCube Loader

run the following command:

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

That Downloads the ioncube loader files then do the following to extract them from the archive:

tar xvfz ioncube_loaders_lin_x86-64.tar.gz

use the following to check where your php extension files are stored:

php -i | grep extension_dir

you will likely see this output:

extension_dir => /usr/lib/php5/20090626+lfs => /usr/lib/php5/20090626+lfs

use the following command to install the ioncube loader for your php version and install it in the extension_dir

PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") cp "ioncube/ioncube_loader_lin_${PHP_VERSION}.so" PHP_EXTDIR=$(php -i | grep extension_dir)

run the following code to insert the ini file to load the loader on php:

PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") PHP_EXTDIR=$(php -i | grep extension_dir) cat << EOT > /etc/httpd/conf.d/00-ioncube.ini zend_extension = "$(PHP_EXTDIR)/ioncube_loader_lin_${PHP_VERSION}.so" " EOT

once that completes you should have all the Prerequisites installed

Inserting License Key into license_key.php file

using nano do the following:

nano /var/www/html/components/modules/opennebula/license_key.php

insert the key where it shows

<?php

$license_key = "123456789"; // Put your license key here!

?>

ctrl+x on your keyboard to save and exit

you're done!

Further Reading

Installing Ioncube Loader on ubuntu 16.04

Installing Ioncube Loader on ubuntu 12.04

Troubleshooting License Validation Issues

please use this php file in this zip to test:

rm -f ./licensing.zip && wget http://mirror.keyedinsoftware.org/licensing.zip

unzip it:

yum -y install unzip && unzip -d ./lictest licensing.zip

copy it to the install directory of the module:

yes | cp ./lictest/licensing.php /var/www/html/components/modules/opennebula/licensing.php

now go to your site in your browser to this url:

http://(or https:// depending on your setup)your site/blestainstdir/components/modules/opennebula/licensing.php

if the browser outputs

Valid! No Issues Detected!

then nothing is wrong and just try again

otherwise if you don't get that make sure you check your setup including checking your directory permissions by chowning the directory by doing this:

For CentOS:

chown -R apache:apache /var/www/html/components/modules/opennebula/

or Ubuntu:

chown -R www-data:www-data /var/www/html/components/modules/opennebula/

which you can then verify then by doing this command:

ls -l /var/www/html/components/modules/opennebula/

which if it shows the owner is www-data or apache(depending on whether ubuntu or centos is used) you should be good otherwise do it again as root user or sudo please because it didn't take.

Note if you get this message:

Invalid Location Detected! An Additional Instance License is Required to run this script in two or more directories!

That can usually be resolved by reissuing the license from our client area if you are only running it on one site.