Friday, December 27, 2024
Google search engine
HomeGuest BlogsInstall Mautic Marketing & CRM Software on CentOS 7 / RHEL 7

Install Mautic Marketing & CRM Software on CentOS 7 / RHEL 7

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 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-php80
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 8.0.12 (cli) (built: Oct 25 2022 17:30:00) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.12, Copyright (c), by Zend Technologies
    with Xdebug v3.1.6, Copyright (c) 2002-2022, 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.

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 2.4.4 2022-10-27 14:39:29

Step 5: Download Mautic source

Install git.

sudo yum -y install git vim
cd ~/

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.

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/mautic/
ServerName mautic.example.com

<Directory /var/www/html/mautic/>
  Options FollowSymLinks
  AllowOverride All
  Order allow,deny
  allow from all
</Directory>
ErrorLog /var/log/httpd/mautic_error_log
CustomLog /var/log/httpd/mautic_access_log common
</VirtualHost>

Validate httpd config:

sudo apachectl -t

Restart httpd service:

sudo systemctl enable --now 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.

mautic installation centos 01

Provide database connection details.

mautic installation centos 02

Create admin account.

mautic installation centos 03

Update email notification.

mautic installation centos 04

You should get a login page.

mautic installation centos 05

Use the credentials provided at setup to login.

mautic installation centos 06

There you have Mautic administration page.

mautic installation centos 07

Visit the Mautic Documentation page for usage guide.

Other guides:

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments