Deploying SugarCRM CE on AWS EC2 and RDS

SugarCRM CE is an open source Customer Relationship Management software developed in PHP and can be deployed on a LAMP stack.

Following is a step by step guideline to help you set up a fully functioning SugarCRM CE instance on AWS cloud platform in minimum cost and time.

1. EC2 - Ubuntu

You need an Ubuntu EC2 instance with at least 4 GB disk space and 1 GB RAM.

Following are the options to launch an EC2 instance for free if your account has the eligibility to use Free Tier

·         For AMI select Ubuntu Server 16.04 LTS

·         For instance type select General purpose t2.micro

·         In the security group open http port

·         Keep rest of the settings as default and launch instance

Once the instance is in running state connect to it via putty

2. RDS - MySQL

Create an RDS instance for MySQL. Choose the following options if you want to avail it for free:

·         Select MySQL as the engine

·         For production purpose select dev/test

·         Make sure to tick the checkbox to only show free tier eligible options


Select MySQL database engine from 5.6 series.

·         Use the security group created for EC2 as the security group for RDS as well.

·         Keep rest of the settings same as default

Important: Do not create any database during the creation of RDS instance.

3. Creating Database

Database can be created using any client tool, like MySQL Workbench, or using the MySQL command line utility.

3.1.   Download MySQL client utility

sudo apt-get install mysql-client

3.2.   Connect to MySQL RDS instance

mysql -h {RDS_Instance_DNS_Name} -P 3306 -u {RDS_Instance_User} –p

For example:

mysql -h -P 3306 -u root -p

And enter password for you RDS instance.

3.3.   Create Database


4. Installing SugarCRM

Following these instructions:

4.1.   Perquisites:

Install the prerequisites, skip apache if you already have it

sudo apt-get install apache2 apache2-doc 
apache2-mpm-prefork apache2-utils libexpat1 
libapache2-mod-php php-common php-gd php-idn php-pear 
php-imap php-mcrypt php-mhash php-mysql php-sqlite php-xmlrpc php-xsl php-curl

Set the memory_limit to 64M (or more) and the upload_max_filesize to 20M in the file: etc/php5/apache2/php.ini

4.2.   Installation

mkdir /var/www/html/sugarcrm

cd /tmp



cd SugarCE-Full-5.2.0/

mv * /var/www/html/sugarcrm/

chown -R www-data:www-data /var/www/sugarcrm

4.3.   Configuration

Perform the rest of the configurations at


NOTE: SugarCRM is compatible with PHP 5 whereas Ubuntu 16.04 does not support this version. So please add the PHP repo in the source and install/enable older version of PHP i.e. 5

4.4.   Testing

If you have followed all the steps correctly you should be able to launch your SugarCRM application by visiting http://{EC2_Public_IP_Address}/sugarcrm


Muhammad Ali

Bluestack IT Solutions