Mautic is a free and open source marketing automation software. It is written in PHP using the Symfony framework and uses MySQL/MariaDB to store its data. It provides many out of the box tools for marketing automation such as Social Media Marketing which allows you to engage the leads through social media. It also provides Contact management and email marketing tools. It allows you to create valuable forms for campaigns to collect information and generate reports using the data gathered.
In this tutorial, we will learn to install Mautic on CentOS 7.
Mautic can be installed on systems with a small amount of RAM. You will also need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i to switch to root user.
Before installing any package it is recommended that you update the packages and repository using the following command.
yum -y update
Once you have your system updated, run the following command to install few packages on your server.
yum -y install httpd mariadb-server mariadb
The above command will install Apache web server with MariaDB database server. Now you will need to install PHP. Mautic supports both PHP 5.6 and 7.0. In this tutorial, we will learn to install both PHP 5.6 and 7.0. You must install only one version of PHP. The YUM repository contains PHP version 5.4 only, hence we will need to use the Webtatic repository to install a version of PHP 5.6 or 7.0. Run the following commands for installing EPEL repository as EPEL repository is required before we install Webtatic repository.
yum -y install epel-releaseyum -y update
Now install Webtatic repository using the following commands.
To start the Apache web server and enable it to start at boot time, run the following commands.
systemctl start httpdsystemctl enable httpd
Start MariaDB and enable it to start at boot time using the following commands.
systemctl start mariadbsystemctl enable mariadb
Now run the following command to secure your MariaDB installation.
It will run a small script which asks you to provide the root password for MariaDB. As we have just installed MariaDB, the root password is not set, just press enter to proceed further. It will ask you if you want to set a root password for your MariaDB installation, choose y and set a strong password for the installation. It will further ask you for removing test databases and anonymous users. Most of the questions are self-explanatory and you should answer yes or y to all the questions.
To create a database we will need to login to MySQL command line first. Run the following command for same.
mysql -u root -p
This will prompt you for the password, provide the root password of MySQL which you have set earlier. Now run the following query to create a new database for your Mautic installation.
CREATE DATABASE mautic;
The above query will create a database named mautic. For the database, you can use any name you prefer at the place of mautic. Make sure that you use semicolon at the end of each query as the query always ends with a semicolon. Once the database is created you can create a new user and grant all the permissions to the user for the database. To create a new database user, run the following query.
CREATE USER 'mautic_user'@'localhost' IDENTIFIED BY 'StrongPassword';
The above query will create a user with username mautic_user. You can use any preferred username instead of mautic_user. Replace StrongPassword with a strong password. Now provide the appropriate privileges to your database user over the database you have created. Run the following command.
GRANT ALL PRIVILEGES ON mautic.* TO 'mautic_user'@'localhost';
Now run the following command to immediately apply the changes on the database privileges.
Exit from MySQL prompt using exit command.
As we have all the dependencies ready, you can install Mautic using composer. Run the following command for same.
cd /var/www/wget https://www.mautic.org/download/latest -O mautic.zip
The above command will download the latest version of the application archive in mautic.zip file. Now unzip the file into /var/www/mautic directory using the following command.
unzip mautic.zip -d mautic
If you don't have unzip installed, you can run yum -y install unzip. Now create a virtual host for your domain or subdomain which will be used to access the Mautic site. Run the following command for same.
nano /etc/httpd/conf.d/yourdomain.com.conf Copy and paste the following lines into the file.
Click on Next Step button to proceed further. In this interface, you will need to provide the database credentials. Choose MySQL PDO as database driver. Don't change the value of database host and port. Provide the name of the database with database username and password. Choose No for backup existing tables.
Click on Next Step button to proceed further. If the database credentials are correct, the installer will write the tables into the database. In next step of installation, you will need to create an administrative account.
Choose the name and email who will send the outgoing emails. For email handling, you can choose to send immediately. Now choose the mailer transport application. You can choose PHP Mail, if you don't have an SMTP server. The emails will be sent using phpmail() function. Which is not recommended as the emails will likely go to spam folder. If you have SMTP server, you can provide the server details. You can also choose the many third party email agent for sending emails.
Once done, click on Next Step button to proceed further. The installation of Mautic is now finished, you can click on Proceed to Mautic to go to Mautic Dashboard after logging in.
Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will...
Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you...