How to install Mautic on Ubuntu 17.04 using LEMP
To install Mautic on Ubuntu 17.04 using LEMP
Mautic is a free and open source marketing automation application that can be used to save time and increase sales. The user can also integrate mautic with various email services like Gmail, Sendgrid and mandrill. It supports Social media marketing, contact management, campaigns, reports and forms. This tutorial explains the installation procedure of Mautic on Ubuntu 17.04 using LEMP.
Installation procedure
To proceed with the installation procedure, install the required dependencies for PHP, MySQL and Nginx.
root@linuxhelp:~# apt-get install -server php7.0-fpm php7.0-mbstring php7.0-xml php7.0-mysql php7.0-common php7.0-gd php7.0-json php7.0-cli php7.0-curl php7.0-mcrypt
The dependencies are added to the system. Now download the mautic package from its official site by running the wget command followed by the download link.
root@linuxhelp:~# wget https://www.mautic.org/download/latest
--2017-09-14 15:23:37-- https://www.mautic.org/download/latest
Resolving www.mautic.org (www.mautic.org)... 104.236.73.40
Connecting to www.mautic.org (www.mautic.org)|104.236.73.40|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://updates.mautic.org/index.php?option=com_mauticdownload& task=downloadPackage [following]
--2017-09-14 15:23:39-- https://updates.mautic.org/index.php?option=com_mauticdownload& task=downloadPackage
Resolving updates.mautic.org (updates.mautic.org)... 104.236.73.40
Connecting to updates.mautic.org (updates.mautic.org)|104.236.73.40|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://s3.amazonaws.com/mautic/releases/2.10.0.zip [following]
--2017-09-14 15:23:40-- https://s3.amazonaws.com/mautic/releases/2.10.0.zip
Resolving s3.amazonaws.com (s3.amazonaws.com)... 52.216.32.11
Connecting to s3.amazonaws.com (s3.amazonaws.com)|52.216.32.11|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 37012962 (35M) [application/zip]
Saving to: ‘ latest’
latest 100%[===================> ] 35.30M 28.1KB/s in 21m 29s
2017-09-14 15:45:10 (28.0 KB/s) - ‘ latest’ saved [37012962/37012962]
Extract the downloaded file by running the unzip command.
root@linuxhelp:~# unzip latest &ndash d /usr/share/nginx/html
Archive: latest
inflating: .htaccess
inflating: .php_cs
creating: app/
extracting: app/.htaccess
inflating: app/AppCache.php
inflating: app/AppKernel.php
inflating: app/AppTestKernel.php
inflating: app/autoload.php
.
.
.
/Signature/OAuthHmacSha1Signature.php
inflating: /usr/share/nginx/html/vendor/willdurand/oauth-server-bundle/Service/Signature/OAuthPlainTextSignature.php
inflating: /usr/share/nginx/html/vendor/willdurand/oauth-server-bundle/Service/Signature/OAuthRsaSha1Signature.php
inflating: /usr/share/nginx/html/vendor/willdurand/oauth-server-bundle/Service/Signature/OAuthSignatureInterface.php
inflating: /usr/share/nginx/html/vendor/willdurand/oauth-server-bundle/Service/XAuthServerService.php
creating: /usr/share/nginx/html/vendor/willdurand/oauth-server-bundle/Util/
inflating: /usr/share/nginx/html/vendor/willdurand/oauth-server-bundle/Util/Random.php
Next provide the owner permission and file execution permission.
root@linuxhelp:~# chown -R www-data:www-data /usr/share/nginx/html/
root@linuxhelp:~# chmod -R 775 /usr/share/nginx/html/
Configure the mautic.conf virtual host configuration file for mautic and enter the following contents in the file. Save and exit the file.
root@linuxhelp:/usr/share/nginx/html# vim /etc/nginx/conf.d/mautic.conf
server {
listen 80
listen [::]:80
server_name 192.168.7.218
root /usr/share/nginx/html
index index.php index.html index.htm index.nginx-debian.html location / {
try_files $uri $uri/ =404
}location ~ .php$ {
include snippets/fastcgi-php.conf
fastcgi_pass unix:/run/php/php7.0-fpm.sock
}location ~* ^/index.php {
fastcgi_split_path_info ^(.+.php)(/.+)$ fastcgi_pass unix:/var/run/php/php7.0-fpm.sock
fastcgi_index index.php
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name include fastcgi_params
fastcgi_buffer_size 128k fastcgi_buffers 256 16k fastcgi_busy_buffers_size 256k fastcgi_temp_file_write_size 256k } }
Restart the Nginx service by running the following command.
root@linuxhelp:/usr/share/nginx/html# systemctl restart nginx
Switch over to the browser and enter http://192.168.7.218. It will lead to the Mautic installer page. Click next step.
Enter the database details to create a database for Mautic.
Enter the required details for the admin side and click next.
Setup the Email configuration for the Mautic and set the details. Click next.
After completing the configuration process, enter the admin credentials to login to Mautic.
The dashboard of Mautic is shown below.
The installation procedure of Mautic on Ubuntu 17.04 using LEMP is done without glitches.