How to Install Mautic Marketing Automation Tool on Ubuntu 20.04 - Barcode Brand Consulting

How to Install Mautic Marketing Automation Tool on Ubuntu 20.04

How AWS enables enterprise-SaaS company LeadSquared scale its marketing and sales automation platform without disruptions
November 3, 2020
Four B2B marketing automation platforms that could boost your business
November 3, 2020

How to Install Mautic Marketing Automation Tool on Ubuntu 20.04

How to Install Mautic Marketing Automation Tool on Ubuntu 20.04

This tutorial exists for these OS versions

Mautic is an open-source self-hosted marketing automation tool for everyone. You can use it to grow up your business or community, monitor your website, create landing pages, create a campaign for your business, manage contacts, and even send marketing emails.

This tutorial will show you how to install the Mautic Marketing Automation Tool on the latest Ubuntu 20.04 Server. We will install Mautic with the LEMP Stack (Linux, Nginx, MySQL, and PHP-FPM), and we will secure our installation using the SSL Letsencrypt.

Prerequisites

What will we do?

Step 1 – Install Nginx Web Server

Firstly, we will install the Nginx packages to the Ubuntu 20.04 Server. The Mautic software will be running under the Nginx web server with a secure HTTPS connection.

Update all available repositories on your system and install Nginx packages using the apt command below.

Once all installation is completed, start the Nginx service and add it to the system boot.

The Nginx service is up and running, check using the following command.

Below is the result you will get.

As a result, the Nginx web server installation on Ubuntu Server has been completed.

Step 2 – Install and Configure PHP-FPM 7.3 on Ubuntu 20.04

At this time, the Mautic software still does not support the new PHP 7.4 version. In that case, we will install the PHP 7.3 packages from the PPA repository to our Ubuntu 20.04 Server.

Install the ‘software-properties-common’ package and add the PPA repository for PHP using the command below.

Once all is completed, you’re ready to install and configure PHP-FPM 7.3 packages.

Install PHP-FPM 7.3 packages with some additional packages using the apt command below.

Once all installation is completed, go to the ‘/etc/php/7.3/fpm’ directory and edit the configuration file ‘php.ini’ using vim editor.

Uncomment the following lines and change the values as below.

Save and close.

Next, start the PHP-FPM service and add it to the boot time.

The PHP-FPM service is up and running. Check using the following command.

Below is the result you will get.

As can be seen, the PHP-FPM service is up and running under the sock file ‘/var/run/php/php7.3-fpm.sock’.Advertisement

As a result, the installation and configuration of PHP-FPM 7.3 on Ubuntu 20.04 Server has been completed.

Step 3 – Install and Configure MySQL Server

In this step, we will install the MySQL Server and configure the default MySQL root password using the ‘mysql_secure_installation’ command utility. And after that, we will create a new MySQL database and user for our Mautic installation.

Install MySQL Server packages using the apt command below.

Once all installation is completed, start the MySQL service and add it to the system boot.

Now check the MySQL service status using the following command.

Below is the result you will get.

As can be seen, the MySQL service is up and running on the Ubuntu 20.04 Server.

Next, we will set up the MySQL root password using the ‘mysql_secure_installation’ command utility provided by MySQL.

Run the ‘mysql_secure_installation’ command below.Advertisement

Now you will be asked for some configurations, type your new password for MySQL root user and type ‘Y‘ for others configuration.

As a result, the password configuration for the MySQL root user has been completed and was ready to create a new database and user for Mautic.

Next, log in to the MySQL shell using the ‘mysql’ command below.

Create a new database named ‘mautic_db‘ and the user ‘mauticuser‘ with the password ‘mautic321‘ using the following queries.

Now type ‘exit‘ to log out from the MySQL shell.

As a result, the MySQL database and user for Mautic installation have been created.

Step 4 – Generate SSL Letsencrypt

For this tutorial, we will secure our Mautic installation using the SSL Letsencrypt. Also, make sure that you have got a domain name, and it’s resolved to your server IP address.

Now install the certbot tool for generating SSL Letsencrypt using the apt command below.

Once all installation is completed, stop the Nginx service and generate the SSL Letsencrypt using the command below. Also, make sure to change the email address and with your own.

One all is completed, your SSL certificates will be available at the ‘/etc/letsencrypt/live/your-domain.com/’ directory.

As a result, the SSL Letsencrypt certificates for Mautic has been generated.

Step 5 – Download Mautic Source Code Latest Version

In this step, we will download and install the Matic latest version to the ‘/var/www’ directory.

Before downloading the Mautic Source Code, install the unzip package using the apt command below.

Next, go to the ‘/var/www’ directory and download the Mautic source code using the wget command below.

Extract the Mautic source code to the new directory named ‘mautic’, then change the ownership of the ‘mautic’ directory to the ‘www-data’ user.

As a result, the Mautic source code has been downloaded to the ‘/var/www’ directory, and we’re ready to install the Mautic Marketing software tool.

Step 6 – Set up Nginx Server Blocks for Mautic

In this step, we will set up the Nginx server blocks for the Mautic installation.

Now go to the ‘/etc/nginx/sites-available’ directory and create a new configuration ‘mautic’ using vim editor.

Change the domain name and path of the SSL certificates with your own, then paste the configuration into it.

Save and close.Advertisement

Next, activate the Nginx virtual blocks for Mautic and make a test for the configuration. Also, make sure there is no error.

Now restart the Nginx service to apply the new server blocks configuration.

As a result, the Nginx server blocks configuration for Mautic has been completed, and we’re ready to continue for the Mautic Post Installation.

Step 7 – Mautic Post Installation

Open your web browser and type the domain name of your Mautic installation on the address bar. Mine is:

https://mautic.hakase-labs.io/

The Mautic installer will do system environment checks for the installation, and make sure you get the “Ready to install” message as below.

Click ‘Next Step‘ to continue the installation.

Now type details MySQL database for the Mautic installation and click ‘Next Step‘ to continue.

Next, type the new admin user, email, and password for the Mautic and click the ‘Next Step‘ button.

For the Mautic Email configuration, chose as you need and click the ‘Next Step‘ button.

And the Mautic installation has been completed, and you will be redirected to the Mautic Login page.

Type your admin user and password, then click the ‘Login‘ button.

Now you will get the Mautic Dashboard.

As a result, the installation of Mautic with the Nginx web server, MySQL database, and PHP-FPM on Ubuntu 20.04 has been completed successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *

Call Now!
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. We shall be happy to assist you :)
👋 Howdy...