Knowledge Base

How to install Blesta on Ubuntu 20

Welcome to the Ubuntu 20 installation for Blesta.

Firstly let's upgrade Ubuntu: sudo apt upgrade -y

Let's now install Apache: sudo apt install apache2 -y

We need to allow Apache via the firewall: sudo ufw allow 'Apache'

Let's make Apache enabled when rebooted: sudo systemctl enable apache2

Time to create your website section

Let's create the configuration for your website: nano /etc/apache2/sites-available/blesta.how.conf replace blesta.how with your domain.

Add the following content to your file, again replace blesta.how with your domain.

<VirtualHost blesta.how:80>
    ServerAdmin webmaster@localhost
    ServerName blesta.how
    ServerAlias www.blesta.how
    DocumentRoot /var/www/html/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Let's enable your configuration file: sudo a2ensite blesta.how.conf

and disable the default configuration file: sudo a2dissite 000-default.conf

Time to restart Apache: sudo systemctl restart apache2

Install MariaDB

Let's install MariaDB: sudo apt install mariadb-server -y

Let's configure MariaDB: sudo mysql_secure_installation

Install PHP

Time to install PHP 7.4: sudo apt install php libapache2-mod-php php-mysql -y

 Set-up Ioncube

Time to set-up Ioncube.

Download ioncube: sudo wget -N https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

Extract ioncube: sudo tar xvzf ioncube_loaders_lin_x86-64.tar.gz

Find and move the ioncube files: sudo php -i | grep extension_dir and sudo mv ioncube/ioncube_loader_lin_7.4.so /usr/lib/php/20190902/ioncube_loader_lin_7.4.so Ours was: /usr/lib/php/20190902/

Add the ioncube loader file to php: sudo nano /etc/php/7.4/cli/php.ini and sudo nano /etc/php/7.4/apache2/php.ini with the following: zend_extension = /usr/lib/php/20190902/ioncube_loader_lin_7.4.so

We need to allow override to make the .htaccess work so: sudo nano /etc/apache2/apache2.conf

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

Reboot Apache by running service apache2 restart

Let's install Blesta.

Go to the html folder: cd /var/www/html

Get the Blesta files: `wget -N https://account.blesta.com/client/plugin/download_manager/client_main/download/190/blesta-5.1.3.zip

Unzip the Blesta zip: unzip blesta-5.1.3.zip

Move the files to the root of Blesta: mv ./blesta/* ./

Remove unwanted files: rm -rf ./blesta/ rm -rf ./LICENSE rm -rf ./README.md rm -rf ./blesta-5.1.3.zip rm -rf ./index.html

Lets provide the right permissions: \chown -R www-data: ./*

Let's install PHPMyAdmin:

cd ~
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl -y

Follow the instructions.

Finally run: sudo phpenmod mbstring

service apache2 restart

Get SSL for free:
sudo snap install core; sudo snap refresh core

sudo snap install --classic certbot

sudo ln -s /snap/bin/certbot /usr/bin/certbot

sudo certbot --apache or sudo certbot certonly --apache

Please rate this article to help us improve our Knowledge Base.

0 0