Share on Social Media

In this guide, you will learn, how to install SuiteCRM on CentOS 7 or other Redhat based Linux distributions. #centlinux #linux #suitecrm

What is SuiteCRM? :

SuiteCRM is a free, open-source and community supported fork of popular proprietary customer relationship management software SugarCRM. SuiteCRM project was started when SugarCRM decided to stop development of its open-source version in Feb 2014. SuitCRM has various sales, marketing and customer support and automation features. SuiteCRM is a free alternative to Salesforce, MS Dynamics, SugarCRM, etc.

In this article, we will install SuiteCRM on CentOS 7. First, we will install and configure the prerequisites and then we will use its web-based installer to configure CRM software.

SuiteCRM Features:

SuiteCRM’s functionality includes sales-force automation, marketing campaigns, customer support, collaboration, Mobile CRM, Social CRM and reporting.

For complete detail about features visit their SuiteCRM official website.

System Requirements:

For complete list of prerequisites please see Compatibility Matrix

Environment Specification:

We have configured a CentOS 7 based virtual machine with following specifications.

  • Hostname – suitecrm-01.example.com
  • IP Address – 192.168.116.175 / 24
  • Operating System – CentOS 7.6
  • Database – MariaDB 5.5
  • Web Server – Apache 2.4
  • PHP – PHP 7.2

Install MariaDB Database Server:

Connect with suitecrm-01.example.com using ssh as root user.

MariaDB 5.5 database server is supported by SuiteCRM 7.11, we can easily install it using yum command because it is available via base yum repository.

If you want to install a latest version of MariaDB database server then you can follow our previous article Installing MariaDB 10.3 Server on CentOS 7.

# yum install -y mariadb-server

Enable and start MariaDB service.

# systemctl enable mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
# systemctl start mariadb.service

Configure MariaDB server as follows.

# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Install Apache Web Server:

Install Apache Web Server using yum command.

# yum install -y httpd

Enable and start httpd.service.

# systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
# systemctl start httpd.service

Allow Apache web service in Linux firewall.

# firewall-cmd --permanent --add-service=http
success
# firewall-cmd --reload
success

Install PHP Support:

SuiteCRM 7.11 supports PHP 7.1 or later, which is not available in default yum repositories.

Therefore, we need to add a third party yum repository like webtatic to install a latest version of PHP.

But first we need to add EPEL (Extra Packages for Enterprise Linux) yum repository.

# yum install -y epel-release.noarch

Add webtatic yum repository using following commands.

# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Retrieving https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
warning: /var/tmp/rpm-tmp.ztLHoc: Header V4 RSA/SHA1 Signature, key ID 62e74ca5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:webtatic-release-7-3             ################################# [100%]

Build yum cache for newly added repositories.

# yum makecache fast
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     | 7.5 kB     00:00
 * base: ftp3.isra.edu.pk
 * epel: mirror.xeonbd.com
 * extras: mirrors.ges.net.pk
 * updates: ftp3.isra.edu.pk
 * webtatic: uk.repo.webtatic.com
base                                                     | 3.6 kB     00:00
epel                                                     | 5.3 kB     00:00
extras                                                   | 3.4 kB     00:00
updates                                                  | 3.4 kB     00:00
webtatic                                                 | 3.6 kB     00:00
(1/5): webtatic/x86_64/group_gz                            |  448 B   00:01
(2/5): epel/x86_64/group_gz                                |  88 kB   00:01
(3/5): webtatic/x86_64/primary_db                          | 160 kB   00:03
(4/5): epel/x86_64/updateinfo                              | 977 kB   00:11
(5/5): epel/x86_64/primary_db                              | 6.8 MB   00:51
Metadata Cache Created

Install PHP and relevant packages using yum command.

# yum install -y php72w php72w-common php72w-xml php72w-mysql php72w-mbstring php72w-imap php72w-gd php-curl php-json php-zip

As required by SuiteCRM server, increase the upload_max_filesize in php.ini file.

# vi /etc/php.ini

Find and set the upload_max_filesize as follows.

upload_max_filesize = 8M

Restart httpd.service to reload configurations.

# systemctl restart httpd.service

Install SuiteCRM Prerequisites:

We required a few more packages to install SuiteCRM on CentOS 7.

Therefore, we are installing these packages using yum command.

# yum install -y pcre pcre-devel zlib-devel gd wget policycoreutils-python unzip

Install SuiteCRM on CentOS 7:

Currently, SuiteCRM 7.11 is available at SuiteCRM Download Page.

# cd /tmp
# wget https://suitecrm.com/files/162/SuiteCRM-7.11/435/SuiteCRM-7.11.5.zip
--2019-06-14 21:05:00--  https://suitecrm.com/suitecrm/index.php?option=com_dropfiles&format=&task=frontfile.download&catid=162&id=435&Itemid=1000000000000
Reusing existing connection to suitecrm.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 58853232 (56M) [application/octet-stream]
Saving to: âSuiteCRM-7.11.5.zip.1â

100%[======================================>] 58,853,232   442KB/s   in 2m 46s

2019-06-14 21:07:47 (345 KB/s) - âSuiteCRM-7.11.5.zip.1â saved [58853232/58853232]

Extract downloaded file in Apache document root using unzip command.

# unzip SuiteCRM-7.11.5.zip -d /var/www/html/
...
  inflating: /var/www/html/SuiteCRM-7.11.5/modules/AOD_Index/Lib/Zend/Search/Lucene/Analysis/Analyzer/Common/TextNum/CaseInsensitive.php
   creating: /var/www/html/SuiteCRM-7.11.5/modules/AOD_Index/Lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Text/
  inflating: /var/www/html/SuiteCRM-7.11.5/modules/AOD_Index/Lib/Zend/Search/Lucene/Analysis/Analyzer/Common/Text/CaseInsensitive.php
finishing deferred symbolic links:
  /var/www/html/SuiteCRM-7.11.5/vendor/bin/update-psl -> ../jeremykendall/php-domain-parser/bin/update-psl
  /var/www/html/SuiteCRM-7.11.5/vendor/bin/parse -> ../jeremykendall/php-domain-parser/bin/parse
  /var/www/html/SuiteCRM-7.11.5/vendor/bin/generate-defuse-key -> ../defuse/php-encryption/bin/generate-defuse-key
  /var/www/html/SuiteCRM-7.11.5/vendor/bin/validate-json -> ../justinrainbow/json-schema/bin/validate-json
  /var/www/html/SuiteCRM-7.11.5/vendor/bin/robo -> ../consolidation/robo/robo
  /var/www/html/SuiteCRM-7.11.5/vendor/bin/release -> ../consolidation/self-update/scripts/release

Rename /var/www/html/SuiteCRM-7.11.5 to a relatively simple name to access it conveniently via web browser.

# cd /var/www/html/
# mv SuiteCRM-7.11.5/ suitecrm

Adjust file permissions on /var/www/html/suitecrm directory.

# cd suitecrm/
# chown -R apache:apache .
# sudo chmod -R 755 .
# chmod -R 775 cache custom modules themes data upload
# chmod 775 config_override.php 2>/dev/null

Since we are configuring SuiteCRM server without disabling the SELinux, therefore we have to set proper SELinux file contexts according to SuiteCRM server requirements.

Adjust SELinux file contexts as required by SuiteCRM installer.

# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/suitecrm/custom(/.*)?'
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/suitecrm/cache(/.*)?'
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/suitecrm/modules(/.*)?'
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/suitecrm/upload(/.*)?'
# restorecon -R .

Create config.php and make it writable by apache user.

# touch config.php
# chown apache:apache config.php
# chmod 775 config.php
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/suitecrm/config.php'
# restorecon -R .

Create .htaccess file and make it writable by apache user.

# touch .htaccess
# chown apache:apache .htaccess
# chmod 775 .htaccess
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/suitecrm/.htaccess'
# restorecon -R .

Since, SuiteCRM is deployed on Apache web server. We can now access it to run SuiteCRM setup.

Browse URL http://suitecrm-01.example.com/suitecrm/install.php using a client’s browser.

SuiteCRM Setup Wizard - Welcome Page

Accept the GNU GPL License and click on Next.

SuiteCRM Setup Wizard - System Environment

If you have performed all the configurations correctly, then you won’t see any warning on this page. Otherwise, you have to resolve those warnings one by one.

Note down the SuiteCRM scheduler configurations, as mentioned in this page. We will configure it after SuiteCRM installation.

Click on Next.

SuiteCRM Setup Wizard - Database Configuration

We are now at Database and Site Configurations page. We have defined database name, database user and SuiteCRM Admin’s password here.

A MariaDB Database and a database user will be created by SuiteCRM installer.

Click on Next.

SuiteCRM Setup Wizard - Installation Progress
SuiteCRM Setup Wizard - Installation Completed

Setup has been completed.

Click on Next.

SuiteCRM Login

Login as admin user.

SuiteCRM Dashboard

You are now reached at the dashboard of SuiteCRM.

Configure SuiteCRM scheduler as follows.

# crontab -e -u apache

and add following line.

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

We have successfully install SuiteCRM on CentOS 7.

Conclusion:

In this guide, you have learned, how to install SuiteCRM on CentOS 7 or other Redhat based Linux distributions. To start using SuiteCRM, we recommend you to read SugarCRM A Complete Guide – 2019 Edition(PAID LINK) Although this book is about SugarCRM, but can be used for SuiteCRM as well.

Leave a Reply

Your email address will not be published. Required fields are marked *