The EuroCMS Installation Guide

authorversiondate
Imri Palojadraft30-05-2022

The dependencies for EuroCMS are:

  • NGINX(/Apache)

  • PHP

  • MariaDB

Ubuntu

Make sure you have a fresh and updated version of Ubuntu, before continuing:

# clean all redundant packages
apt clean all

# Refresh the repo data
apt update

# A full upgrade of the Ubuntu system
apt full-upgrade

NGINX Installation

The installation steps are from: https://nginx.org/en/linux_packages.html#Ubuntu. Follow the below steps on by one.

# Install NGINX dependencies

apt install curl gnupg2 ca-certificates lsb-release

# Add the NGINX repo
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list

# Add and accept the NGINX repo key.
curl -s 'https://nginx.org/keys/nginx_signing.key' | apt-key add -

# Refresh our repos
apt update

# Install NGINX
apt install nginx

Depending in your own setup, you can add an NGINX configuration item, for EuroCMS.

Starting up NGINX

NGINX should be loaded by default, if not, please enable it:

systemctl enable --now nginx

PHP Installation

Install the latest supported version of PHP and its modules:

apt install php php-fpm php-common php-curl php-dev php-imagick php-mysql php-zip php-gd

Browscap module for PHP.

browscap is a PHP module we use for our analytics module. Without this, the analytics module will not function.

# Download the latest browscap module
wget 'https://browscap.org/stream?q=Full_PHP_BrowsCapINI' -O /etc/php/fpm/conf.d/browscap.ini

Enabling the module in the php.ini file. Add the following content to: /etc/php/fpm/php.ini

[browscap]
; http://php.net/browscap
browscap = /etc/php/fpm/conf.d/browscap.ini

Restart PHP

Restart PHP for the changes to take affect.

systemctl restart php-fpm

MariaDB installation

We will install MariaDB via the official repos. From: https://mariadb.org/download/

Dependencies

Install the required dependencies:

apt install software-properties-common dirmngr apt-transport-https

Repo Key

Add the MariaDB repo key:

sudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'

Repo

Add the repo key to your Ubuntu server

sudo add-apt-repository 'deb [arch=amd64] https://mariadb.mirror.wearetriple.com/repo/10.11/ubuntu `lsb_release -cs` main'

Installing the MariaDB server

apt install mariadb-server

Enabling the MariaDB server

systemctl enable --now mariadb

Creating our EuroCMS database and users

Change the EuroCMS user(EuroCMS_usr) and the password(EuroCMS_pword) to whatever you like. Make sure to securely save your credentials. You need them latter when installing EuroCMS.

mysql -u root -e 'create database EuroCMS_db;'
mysql -u root -e "grant all privileges on EuroCMS_db.* TO 'EuroCMS_usr'@'%' identified by 'EuroCMS_pword';"
mysql -u root -e 'FLUSH PRIVILEGES;'

You can change the % in the query, to an IP address, so that the Database is IP protected.

Now restart MariaDB

systemctl restart mariadb

Finished

Access your website, and you will be redirect to the EuroCMS installer. please follow the steps mentioned in the Installer.

Configuration Guide

After installation is done, there are allot of optimization available to do.

  • File/folder permissions

Make sure the files and folders have the proper permissions and owners. This on some servers is not properly set, which can be a security issue.

Also, make sure you run everything in its own user, and not by the root user or such.

  • Advanced Caching

    • Web Server

    • PHP OPCache

    • MariaDB Query

    • Memory

  • Web server Security rule

You can deny certain ways of accessing the web server application. This will benefit the security.

  • Web Application Firewall

Setup a web application firewall via your server.