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.

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
# rpm -Uvh
CentOS/RHEL 6:
# rpm -Uvh
# rpm -Uvh
CentOS/RHEL 5:
# rpm -Uvh
# rpm -Uvh

For 32 Bit:

CentOS/RHEL 6:
# rpm -Uvh
# rpm -Uvh 
CentOS/RHEL 5:
# rpm -Uvh
# rpm -Uvh

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

Extract downloaded archive using below command and set permission.

# unzip
# 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.


Select preferred language and Click Next.

After a series of system checks hit Next to continue.

Accept License Aggrement and Click Next.

Select Installation Options and click Next.

Select Database Type and Click Next.

Fill the Required Database Details and click Next.

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

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.

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

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

# vim /var/www/html/.htaccess
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

Now Login with the credentials created by you.


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.