Mautic is a free and opensource, fully-featured CRM and Marketing platform created to enable organizations, small and large to send multi-channel communications simultaneously and at scale that the business demands. You can easily personalize the experience for individual contacts for fulfilling customer engagements. This guide will walk you through the installation of Mautic CentOS CentOS 7 Linux machine.

Setup Requirements

The installation of Mautic Marketing & CRM on CentOS 7 has the following requirements:

  • PHP 5.6.19
  • PHP modules:
Required: zip, xml, mcrypt, imap, mailparse
Rccommended: openssl, opcache / apcu / memcached
Recommended for development: xdebug
  • Nginx / Apache web server
  • MySQL Database server
  • Recommended memory limit: Minimally 256 MB for testing, 512 MB and more for production.
  • Git
  • Composer

We’ll cover the setup steps in the next sections.

Step 1: Update System

Run these commands to update your CentOS server:

sudo yum -y update
sudo reboot

Step 2: Install PHP with extensions and Git

Install Git on your CentOS machine:

sudo yum -y install vim git

Install PHP and required extensions:

sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install epel-release
sudo yum -y install yum-utils
sudo yum-config-manager --disable remi-php54
sudo yum-config-manager --enable remi-php70
sudo yum -y install wget php php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap,mailparse,mcrypt,openssl,opcache,apcu,memcached,xdebug}

Confirm PHP installation:

$ php --version
PHP 7.0.33 (cli) (built: Dec 17 2019 16:44:25) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.9.0, Copyright (c) 2002-2019, by Derick Rethans

Set PHP timezone:

$ sudo vim /etc/php.ini
date.timezone = Africa/Nairobi

Step 3: Install MariaDB database server

We’ll use MariaDB database server. Install it on your CentOS machine using our guide below.

Install MariaDB database server on CentOS 7

After installation and starting mariadb service. Login and and set Recommended MySQL defaults:

$ mysql -u root -p
SET GLOBAL innodb_default_row_format=DYNAMIC;
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Create database and user for Mautic:

CREATE DATABASE mautic;
CREATE USER 'mautic'@'localhost' IDENTIFIED BY 'MauticDBPassword';
GRANT ALL PRIVILEGES ON mautic.* TO 'mautic'@'localhost' IDENTIFIED BY 'MauticDBPassword';
FLUSH PRIVILEGES;
EXIT;

Replace MauticDBPassword with the Mautic database password.

Step 4: Install httpd and PHP Composer

Install Apache Web server

sudo yum -y install httpd

Also download and install Composer.

sudo yum -y install wget unzip
wget https://getcomposer.org/installer -O composer-installer.php
sudo php composer-installer.php --filename=composer --install-dir=/usr/local/bin 

Check version:

$ composer --version
Composer version 1.9.1 2019-11-01 17:20:17

Step 5: Download Mautic source

Clone the repository:

$ git clone https://github.com/mautic/mautic.git
Cloning into 'mautic'...
remote: Enumerating objects: 264, done.
remote: Counting objects: 100% (264/264), done.
remote: Compressing objects: 100% (158/158), done.
remote: Total 232580 (delta 157), reused 176 (delta 99), pack-reused 232316
Receiving objects: 100% (232580/232580), 92.38 MiB | 28.34 MiB/s, done.
Resolving deltas: 100% (167361/167361), done.

The mautic directory should appear in the server root. Change directory to mautic directory:

cd mautic

Install dependencies:

$ composer install

Move the directory to /var/www/html:

cd ..
sudo mv mautic /var/www/html

Disable SELinux and set directory permissions:

sudo setenforce 0
sudo sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
sudo chown -R apache:apache /var/www/html/mautic
sudo chmod -R 775 /var/www/html/mautic

Step 6: Configure Apache & Access Mautic Web UI

Configure Apache:

sudo vim /etc/httpd/conf.d/mautic.conf

Add below configuration file setting correct domain name under ServerName and ServerAlias.


ServerAdmin [email protected]
DocumentRoot /var/www/html/mautic/
ServerName mautic.example.com
ServerAlias www.mautic.example.com


  Options FollowSymLinks
  AllowOverride All
  Order allow,deny
  allow from all

ErrorLog /var/log/httpd/mautic_error_log
CustomLog /var/log/httpd/mautic_access_log common

Validate httpd config:

$ sudo apachectl -t

Restart httpd service:

sudo systemctl restart httpd

Open http port in the firewalld.

sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --reload

Visit Mautic in a browser mautic.example.com and follow installation steps.

Provide database connection details.

Create admin account.

Update email notification.

You should get a login page.

Use the credentials provided at setup to login.

There you have Mautic administration page.

Visit the Mautic Documentation page for usage guide.

Other guides:

How To Install SuiteCRM on CentOS 8 Linux

Install Dolibarr ERP & CRM on Ubuntu

How To Install vTiger CRM on Ubuntu