How to Install SugarCRM Community on CentOS 5/6/7

SugarCRM is a Customer Relationship Management which can be easily installed and configured on top of LAMP stack. One of the best thing about SugarCRM is that its source code of the application is available to any user, developer or customer of the product. It is often used to track customer orders, billing history and to catalog any complaints you have.
SugarCRM

Click Here to read more about SugarCRM latest news.

This article will guide you how to install SugarCRM on CentOS and RHEL.

Step #1 Add Repository

Use following commands to add repository on your CentOS/RHEL systems.
For 64 Bit:

CentOS/RHEL 7:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
CentOS/RHEL 6:
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
CentOS/RHEL 5:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-releas5-4.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

For 32 Bit:

CentOS/RHEL 6:
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 
CentOS/RHEL 5:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

Step #2 Setup LAMP

In order to run SugarCRM application, we need to setup LAMP environment. We assume that you already have PHP, MySQL and Apache installed on you system. If you don’t have use following article.

Install LAMP on CentOS/RHEL 7
Install LAMP on CentOS/RHEL 5/6

Step #3 Install Required Modules

We also need to install some specific modules for SugarCRM. Use following command to install them

# yum install php-gd php-imap php-ldap php-odbc php-mbstring php-pear php-xml php-xmlrpc php-soap
# yum install curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel

Step #4 PHP Configuration

Edit PHP configuration file /etc/php.ini and make the following changes:

# vim /etc/php.ini
64-bit System:
memory_limit = 512M
upload_max_filesize = 10M
32-bit System:
memory_limit = 256M
upload_max_filesize = 10M

After making above changes restart Apache service to apply changes.

# service httpd restart

Step #5 Download and Extract SugarCRM

Download and extract latest sugarcrm available version from SugarCRM official site.

# cd /opt
# wget http://downloads.sourceforge.net/project/sugarcrm/1%20-%20SugarCRM%206.5.X/SugarCommunityEdition-6.5.X/SugarCE-6.5.22.zip

Extract downloaded archive using below command and set permission.

# unzip SugarCE-6.5.22.zip
# cd SugarCE-Full-6.5.22
# cp -rf * /var/www/html
# cd /var/www/html
# chown -R apache:apache *
# chmod -R 755 *
# chmod -R 766 cache custom modules upload
# chmod 777 install.php config.php config_override.php

Step #6 Start SugarCRM Web Installer

After configuring apache, connect to your server using configured ServerName and following the web installer wizzard to complete setup.

http://<IP_Address>/install.php

Select preferred language and Click Next.
SugarCRM-1

After a series of system checks hit Next to continue.
SugarCRM-2

Accept License Aggrement and Click Next.
SugarCRM-3

Select Installation Options and click Next.
SugarCRM-4

Select Database Type and Click Next.
SugarCRM-5

Fill the Required Database Details and click Next.
SugarCRM-6

Fill admin account details login in admin panel after installation and click Next.
SugarCRM-7

This screen will show you the selection done by you. Also it shows to schedule cron to automate the tasks while using SugarCRM. Now click Install.
SugarCRM-8

Now you have installed SugarCRM, Just click Next and you will be redirected to Admin Login screen.
SugarCRM-9

Add below content in .htaccess file to secure your sugarcrm application.

# vim /var/www/html/.htaccess
# BEGIN SUGARCRM RESTRICTIONS
RedirectMatch 403 (?i)^.*\.log$
RedirectMatch 403 (?i)/+not_imported_.*\.txt
RedirectMatch 403 (?i)/+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+.*\.(php|tpl)
RedirectMatch 403 (?i)/+emailmandelivery\.php
RedirectMatch 403 (?i)/+cache/+upload
# END SUGARCRM RESTRICTIONS

Now Login with the credentials created by you.
SugarCRM-10

SugarCRM-11

Step #7 Set Cron Job

Finally add the following cronjob for SugarCMS on your machine by running.

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

Enjoy it!

No Responses

Leave a Reply

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.