Friday, November 1, 2024
Google search engine
HomeGuest BlogsInstall SuiteCRM on CentOS 8|Rocky Linux 8|AlmaLinux 8

Install SuiteCRM on CentOS 8|Rocky Linux 8|AlmaLinux 8

.tdi_3.td-a-rec{text-align:center}.tdi_3 .td-element-style{z-index:-1}.tdi_3.td-a-rec-img{text-align:left}.tdi_3.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_3.td-a-rec-img{text-align:center}}

In this guide, we’ll discuss the installation of SuiteCRM on CentOS 8|Rocky Linux 8|AlmaLinux 8 Linux system. SuiteCRM is an open source, enterprise-class CRM application developed and maintained by SalesAgility team. This product was originally forked the SugarCRM Community Edition.

SuiteCRM will help you to manage your business processes, customer data, access to business information, customer interaction, and automate sales for better customer and service delivery experience.

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.

.tdi_2.td-a-rec{text-align:center}.tdi_2 .td-element-style{z-index:-1}.tdi_2.td-a-rec-img{text-align:left}.tdi_2.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_2.td-a-rec-img{text-align:center}}

Install SuiteCRM – Requirements

  • 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: Update System

I recommend you always start work on an updated system:

sudo dnf -y update

Step 2: Install PHP and its extensions

The first step is to ensure you have the PHP and required extensions are installed in your server.

sudo dnf -y install yum-utils
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf module reset php -y
sudo dnf -y module install php:remi-7.4
sudo dnf -y install wget php php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap}

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

$ php -v
PHP 7.4.28 (cli) (built: Feb 15 2022 13:23:10) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies

Increase php timeout and max file upload size:

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

Set correct user to run php-fpm service:

$ sudo vim /etc/php-fpm.d/www.conf
user = nginx
group = nginx
listen.owner = nginx
listen.group = nginx
listen.mode = 0660

Start and enable php-fpm service:

sudo systemctl enable --now php-fpm

Confirm the service is started without any errors:

$ systemctl status php-fpm
 php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2022-04-02 22:28:36 UTC; 4s ago
 Main PID: 38804
   Status: "Ready to handle connections"
    Tasks: 6 (limit: 23694)
   Memory: 16.7M
   CGroup: /system.slice/php-fpm.service
           ├─38804 php-fpm: master process (/etc/php-fpm.conf)
           ├─38805 php-fpm: pool www
           ├─38806 php-fpm: pool www
           ├─38807 php-fpm: pool www
           ├─38808 php-fpm: pool www
           └─38809 php-fpm: pool www
Jan 04 21:07:19 centos8.novalocal systemd[1]: Starting The PHP FastCGI Process Manager...
Jan 04 21:07:19 centos8.novalocal systemd[1]: Started The PHP FastCGI Process Manager.

Step 3: Install MariaDB and Nginx Web Server

For this setup, we will use Nginx as a web server for SuiteCRM.

sudo dnf -y install nginx

Create and configure session path:

sudo mkdir -p /var/lib/php/session
sudo chown nginx:nginx /var/lib/php/session

For database installation refer to out guide:

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

$ mysql -u root -p
CREATE DATABASE suitecrm;
GRANT ALL ON suitecrm.* TO suitecrm@localhost IDENTIFIED by "StrongDBPassword";
FLUSH PRIVILEGES;
QUIT

Step 4: Install SuiteCRM on CentOS 8|Rocky Linux 8|AlmaLinux 8

Install curl and wget

sudo yum -y install wget curl unzip policycoreutils-python-utils

Check SuiteCRM releases page for the latest release.

VER=$(curl -s https://api.github.com/repos/salesagility/SuiteCRM/releases/latest|grep tag_name | cut -d '"' -f 4|sed 's/v//')
wget https://github.com/salesagility/SuiteCRM/releases/download/v${VER}/SuiteCRM-${VER}.zip
unzip SuiteCRM-${VER}.zip

Install composer:

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

Run composer install:

cd SuiteCRM-${VER}
composer install

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

cd ..
sudo mkdir /var/www/html/suitecrm
sudo mv SuiteCRM-${VER}/ /var/www/html/suitecrm

Change ownership of /var/www/html/sduitecrm irectory to the web user:

sudo chown -R nginx:nginx /var/www/html/suitecrm
sudo chmod -R 766 /var/www/html/suitecrm
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/suitecrm(/.*)?"
sudo restorecon -Rv /var/www/html/suitecrm/

Configure Nginx

Create Nginx configuration file.

$ sudo vim /etc/nginx/conf.d/suitecrm.conf 
server {
    server_name crm.example.com;
    client_max_body_size 20M;
    root /var/www/html/suitecrm;
    
    location / {
       try_files $uri /index.php;
   }
location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass unix:/var/run/php-fpm/www.sock;
    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 restart nginx php-fpm
sudo systemctl enable nginx php-fpm

Allow http port in the firewall:

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

Step 5: 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: suitecrm
Host Name: localhost
User: suitecrm
Password: StrongDBPassword

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 /var/www/html/suitecrm; php -f cron.php > /dev/null 2>&1

That’s all. Enjoy using SuiteCRM on CentOS 8|Rocky Linux 8|AlmaLinux 8 Linux.

Similar:

.tdi_4.td-a-rec{text-align:center}.tdi_4 .td-element-style{z-index:-1}.tdi_4.td-a-rec-img{text-align:left}.tdi_4.td-a-rec-img img{margin:0 auto 0 0}@media(max-width:767px){.tdi_4.td-a-rec-img{text-align:center}}

RELATED ARTICLES

Most Popular

Recent Comments