Sunday, November 17, 2024
Google search engine
HomeGuest BlogsHow To Install SuiteCRM on Ubuntu 18.04 / CentOS 7 with Nginx

How To Install SuiteCRM on Ubuntu 18.04 / CentOS 7 with Nginx

In this guide, I’ll take you through the installation of SuiteCRM on Ubuntu 18.04 / CentOS 7. SuiteCRM is the award-winning, enterprise-class open source CRM system developed and maintained by SalesAgility. It is a fork of the popular open source SugarCRM Community Edition. It comes bundled with additional open source modules and standard features found within SugarCRM CE.

SugarCRM is under active development, and there are many regular functionalities and improvements being added to the core product to make it the best Open Source CRM product. It competes with proprietary CRM vendors such as SugarCRM, Salesforce, and Microsoft.

Install SuiteCRM on Ubuntu 18.04 / CentOS 7 – Pre-requisites

  • PHP
  • Nginx web server
  • MySQL / MariaDB database server
  • A user with sudo privileges

Follow the steps below to install and start using SuiteCRM to manage business processes, customer data, access to business information, customer interaction, to automate sales e.t.c.

Step 1: Install PHP on Ubuntu 18.04 / CentOS 7

The first step is to ensure you have the PHP and modules required.

Install PHP on Ubuntu 18.04

Ubuntu 18.04 has PHP 7.2 in its repositories. Install it by running the commands below on your terminal:

sudo apt-get -y install wget php php-{pear,cgi,common,curl,mbstring,gd,mysql,gettext,bcmath,imap,json,xml,fpm}

Install PHP on CentOS 7

For CentOS 7 system. we’ll install php 7.2 from Remi rpm repository:

sudo yum install epel-release yum-utils wget
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

Disable remi-php54 and enable remi-php72 repository:

sudo yum-config-manager --disable remi-php54
sudo yum-config-manager --enable remi-php72

Then install php

sudo yum -y install wget php php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,imap,json,xml,fpm}

To confirm the php version installed, use the command php -v

# php -v
PHP 7.2.8 (cli) (built: Jul 17 2018 09:50:46) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Increate php timeout and max file upload size:

$ sudo vim /etc/php.ini
upload_max_filesize = 20M
max_execution_time = 120

Step 2: Install MariaDB and Nginx Web Server

For this setup, we will use Nginx as a web server for SuiteCRM. Install it on your CentOS 7 / Ubuntu 18.04 server using either yum or apt package manager.

$ sudo apt-get install nginx # Ubuntu 18.04
$ sudo yum install nginx # CentOS 7

On the site of the database, the server of choice is MariaDB. Install it using the guide below:

Install MariaDB 10.3 on Ubuntu 18.04 and CentOS 7

Once database server has been installed, you need to create a database for SuiteCRM.

create database suitecrm;
grant all on suitecrm.* to suitecrm@localhost IDENTIFIED by "StrongPassword";
flush privileges;
quit

Step 3: Install SuiteCRM on Ubuntu 18.04 / CentOS 7

Check SuiteCRM releases page for the latest release. As of this writing, the latest release is v7.11.8.

export VER="7.11.8"
wget https://github.com/salesagility/SuiteCRM/archive/v${VER}.tar.gz
tar xvf v${VER}.tar.gz
rm v${VER}.tar.gz

We then need to create a directory for hosting SuiteCRM web data:

sudo mkdir /srv/suitecrm
sudo rsync -avv SuiteCRM-${VER}/* /srv/suitecrm

Change ownership of /srv/suitecrm directory to the web user:

For CentOS:

chown -R nginx:nginx /srv/suitecrm/
cd /srv/suitecrm/
chmod -R 775 *

For Ubuntu:

chown -R www-data:www-data /srv/suitecrm/
cd /srv/suitecrm/
chmod -R 775 *

Configure Nginx

$ sudo vim /etc/nginx/conf.d/suitecrm.conf 
server {
    server_name crm.example.com;
    client_max_body_size 50M;
    root /srv/suitecrm;
    
    location / {
       try_files $uri /index.php;
   }
location ~ \.php$ {
    try_files $uri =404;
    #fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
    fastcgi_pass localhost:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }
error_log /var/log/nginx/suitecrm_error.log;
access_log /var/log/nginx/suitecrm_access.log;
location ~ /\.ht {
    deny all;
  }
}

When done, start nginx and php-fpm service:

sudo systemctl start nginx php-fpm
sudo systemctl enable nginx php-fpm

Step 4: Access SuiteCRM Web Interface

Open your favorite browser and go to http://crm.example.com

Tick “I Accept” to accept License Agreement terms.

suitecrm install start

Click Next to continue

suitecrm install 02 min

Make sure all checks return OK, then click Next to continue.

On the next page provide:

Configure Database: ( Select Use existing user option)

Database Name: suitcrm_db
Host Name: localhost
User: suitecrm_user
Password: db-user-password

Configure Identify Administration User

SuiteCRM Application Admin Name: Admin
SuiteCRM Admin User Password: Admin-user-password
Re-enter SuiteCRM Admin User Password:

URL of SuiteCRM Instance: URL configured on Nginx

When the installation is done, you should get a login page.

suitecrm install 08

Once done, set up cron for the web user to run SuiteCRM Schedulers,

sudo crontab -e -u nginx

Add the following line to the crontab file:

* * * * * cd /srv/suitecrm; php -f cron.php > /dev/null 2>&1

That’s all. Enjoy using SuiteCRM on Ubuntu 18.04 / CentOS 7 Linux.

Similar:

Install Dolibarr ERP & CRM on Ubuntu 18.04 LTS

How to Install ERPNext ERP System on Ubuntu 18.04

How To Install Odoo 13 on Ubuntu 18.04 Linux

Install Dolibarr ERP & CRM on Ubuntu 18.04 LTS

RELATED ARTICLES

Most Popular

Recent Comments