Install SugarCRM on CentOS 6.4 / RHEL / 6.4 / Scientific Linux 6.4

SugarCRM is a web based CRM(Customer Relationship Management) Solution written in PHP. It comes with different editions such as Enterprise, Ultimate, Corporate, Professional and Community(free) editions. For more details about the editions refer the official link.


In this how-to, i am gonna to show you how to install SugarCRM Community edition in CentOS 6.4.


Install the necessary softwares such as MySQL, Apache and PHP modules first as shown below.

[root@server ~]# yum install mysql mysql-server httpd php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-magickwand php-mapserver php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel unzip wget -y

After installing the above prerequisites, we need to tune the PHP settings. To do that open file /etc/php.ini and adjust the following settings. Make sure that memory_limit is set as 128M, post_max_size and upload_max_size as 20M.

[root@server ~]# vi /etc/php.ini
 memory_limit = 128M
 post_max_size = 20M
 upload_max_filesize = 20M

Once done this reboot the server to save the changes.

Now start Apache and MySQL services and make them to start automatically on every reboot.

[root@server ~]# /etc/init.d/httpd start
[root@server ~]# /etc/init.d/mysqld start
[root@server ~]# chkconfig httpd on
[root@server ~]# chkconfig mysqld on

Setup MySQL Root password

To setup the MySQL root password, run the following command.

[root@server ~]# /usr/bin/mysql_secure_installation 

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, 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):     ## Press Enter ## 
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

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

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL 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]     ## Press Enter ##
 ... 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]     ## Press Enter ## 
... Success!
By default, MySQL 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]     ## Press Enter ##
 - 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]     ## Press Enter ##
 ... Success!

Cleaning up...

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

Installing SugarCRM

Download the latest version of SugarCRM.

[root@server ~]# wget

Extract the downloaded file.

[root@server ~]# unzip

Create a new directory for SugarCRM in the apache root document folder. In this case let us create a directory sugarcrm.

[root@server ~]# mkdir /var/www/html/sugarcrm

Move the extracted SugarCRM installtion folder to /var/www/html/sugarcrm directory.

[root@server ~]# cd SugarCE-Full-6.5.12/
[root@server SugarCE-Full-6.5.12]# mv * /var/www/html/sugarcrm/
[root@server SugarCE-Full-6.5.12]# chown -R apache:apache /var/www/html/sugarcrm/

Open the apache default port 80 through your firewall/router.

[root@server ~]# vi /etc/sysconfig/iptables
 # Firewall configuration written by system-config-firewall
 # Manual customization of this file is not recommended.
 -A INPUT -p udp -m state --state NEW --dport 80 -j ACCEPT
 -A INPUT -p tcp -m state --state NEW --dport 80 -j ACCEPT
 -A INPUT -p udp -m state --state NEW --dport 53 -j ACCEPT
 -A INPUT -p tcp -m state --state NEW --dport 53 -j ACCEPT
 -A INPUT -p icmp -j ACCEPT
 -A INPUT -i lo -j ACCEPT
 -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
 -A INPUT -j REJECT --reject-with icmp-host-prohibited
 -A FORWARD -j REJECT --reject-with icmp-host-prohibited

Restart the iptables to save the changes.

[root@server ~]# /etc/init.d/iptables restart

Now navigate to the web browser using the URL http://ip-address/sugarcrm or http://domain-name/sugarcrm. Follow the on screen instructions.

Click Next.

Sugar Setup Wizard: Welcome to the SugarCRM 6.5.12 Setup Wizard - Mozilla Firefox_001

Scroll down on the next screen and click Next.

Sugar Setup Wizard: Are you ready to install? - Mozilla Firefox_002

Accept the License agreement and click Next.

Sugar Setup Wizard: License Acceptance - Mozilla Firefox_003

Select the installation type and click Next.

Sugar Setup Wizard: Installation Options - Mozilla Firefox_004

Select the Database and click Next.

Sugar Setup Wizard: Database Type - Mozilla Firefox_013

Enter the Database name(Database is automatically created in this step, if it isn’t created earlier), Hostname, Database administrative user(root), database password(mysql root user password) and select Define user to create from the drop-down box, enter the sugarcrm database username(e.g sugarcrm), password and finally click Next.

Sugar Setup Wizard: Database Configuration - Mozilla Firefox_011

Next enter the sugarcrm admin name (default username is admin) and password created in the earlier step.

Sugar Setup Wizard: Site Configuration - Mozilla Firefox_012

Now the summary of your selections will be displayed, if everything is Ok click Install.

Sugar Setup Wizard: Confirm Settings - Mozilla Firefox_014

The sugarcrm installation is starting now. Click Next to begin installation.

Sugar Setup Wizard: Perform Setup - Mozilla Firefox_015

Enter your mail-id , name and company name etc if you want to receive newsletters. This is optional. Then the login screen will appear. Enter the username as admin and password you have created earlier.

SugarCRM - Mozilla Firefox_016

After login, you will see the following screen, click Next to configure SugarCRM.

Admin Wizard - Mozilla Firefox_017

You can upload your company logo here. Click Next.

Admin Wizard - Mozilla Firefox_019

Set the system locale settings such as date and time and currency etc. Click Next.

Admin Wizard - Mozilla Firefox_020

Now you have to tell SugarCRM how it send emails. It will send emails using Gmail, Yahoo and Microsoft Exchange servers. If you have other email servers such as Senmail or Postfix, enter the details in other tab.

Admin Wizard - Mozilla Firefox_022

Enter the Administrator details of SugarCRM and Click Next.

User Wizard - Mozilla Firefox_023

Enter your System Locale settings such as Currency, date and time and Click Next.

User Wizard - Mozilla Firefox_024

Now SugarCRM installation is completed. Here you can create New users, Import existing data’s, configure the CRM and so on. If you done everything click Finish to start using CRM.

User Wizard - Mozilla Firefox_025

This is how your SugarCRM home page will appear.

SugarCRM - Mozilla Firefox_026

Thats it. I recommend you to read the User Guide/Administrator Guide to know more about using SugarCRM.


Suppose if you did something wrong or your installer stopped suddenly, you can start the installer again from the beginning. To do that open the ‘config.php’ in the /var/www/html/sugarcrm directory. Change the line installer_locked=false to installer_locked=true.

[root@server ~]# vi /var/www/html/sugarcrm/config.php 
## Change from false to true ##
'installer_locked' => true,

Now you will able to start the installer from the beginning. After completing your installation, don’t forget to change it as false back.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s