SuiteCRM 7 on Ubuntu 15

SuiteCRM is a free and open source alternative to Salesforce and Dynamics CRM. It’s based on SugarCRM, who in February 2014 announced that they would no longer be releasing new open source versions of their Community Edition. SuiteCRM is primarily maintained by Sales Agility.


You will need a machine with Ubuntu installed on it. I started with a fresh install of Ubuntu Server 15.10. Download it here. During installation of the operating system, I opted to install only the OpenSSH server. All other prerequisites will be added in the steps below.

All the steps below assume you are logged in to a terminal session on your Ubuntu server, as a normal user.

Step 1

Before we can start installing SuiteCRM, you need to have some basics in place. SuiteCRM is written in PHP, and runs on Apache2, so let’s install those first:

$ sudo apt-get install apache2 php5 libapache2-mod-php5

You need to adjust some PHP parameters to get SuiteCRM working. You could change these in the main php.ini file, but I feel the following set up is cleaner. Oh, and if “vi” isn’t your thing, feel free to use any other text editor!

$ sudo vi /etc/php5/mods-available/suitecrm.ini

Copy the following lines into suitecrm.ini. You can of course adapt these values to suit your environment. The values I’ve used are the ones specified as minimum values per the SuiteCRM documentation.

; configuration for SuiteCRM
; priority=99
post_max_size = 64M
upload_max_filesize = 64M
max_input_time = 120
memory_limit = 256M

Next, tell PHP to use these values:

$ sudo php5enmod suitecrm

You will also need to install some PHP modules that are required by SuiteCRM:

$ sudo apt-get install php-xml-parser php5-json php5-curl php5-gd php5-imap

On Ubuntu 15, the PHP5 IMAP module isn’t enabled by default. You will need to enable it manually, otherwise things like sending and receiving e-mails and campaigns will not work.

$ sudo php5enmod imap

Step 2

So far, we have installed a web server (Apache2) and the PHP language, and configured them in preparation of installing SuiteCRM. But SuiteCRM also needs a database to store its data. You can choose between MariaDB, MySQL or MS SQL Server, each of which can be installed on the same or on another server. I’m going to install MariaDB on the same server as SuiteCRM.

$ sudo apt-get install mariadb-client mariadb-server

Next, secure MariaDB by typing the command below. Select a password (and remember it!), and reply Y(es) to all the other questions.

$ sudo mysql_secure_installation

With your database server now up and running, you need to make sure PHP has access to it. If you chose MariaDB or MySQL as your database application, you will need to install the MySQL drivers for PHP. They are in the php5-mysqlnd package. If you opted to connect to a MS SQL Server database instead, you are on your own, but this page might help you out.

$ sudo apt-get install php5-mysqlnd

At this point, it’s probably wise to restart your Apache web server:

$ sudo systemctl restart apache2

Step 3

Next, we will set up the SuiteCRM database itself. This involves creating a user that will “own” the SuiteCRM database, creating the database itself, and finally granting permissions on the database to the database owner. The instructions below should work on MySQL and MariaDB. If you are using MS SQL Server, check the help files inside SQL Server Management Studio.

Right, let’s connect to the database server using the command below. It will prompt for a password. This is not the Ubuntu root password, but the database server password, which you specified a couple of paragraphs earlier (I told you to remember it!).

$ sudo mysql -u root -p

First you create a new database user with the CREATE USER command. You can choose any name and password you like, but be sure to remember them, you will need these later on. In the example below, I chose “suitecrmdbo” and password “P@ssw0rd”. Remeber these values, you’ll need them later on. Next you create the SuiteCRM database with the CREATE DATABASE command. I’ve named my SuiteCRM database “suitecrmdb”. Again, remember this for later. Finally, use the GRANT command to give the SuiteCRM database owner maximum permissions on the SuiteCRM database.

MariaDB [(none)]> CREATE USER 'suitecrmdbo' IDENTIFIED BY 'P@ssw0rd';
Query OK, 0 rows affected (0.00 sec)
MariadDB [(none)]> CREATE DATABASE suitecrmdb;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> GRANT ALL ON suitecrmdb.* TO 'suitecrmdbo';
Query OK, 0 rows affected (0.00 sec)
MariadDB [(none)]> \q

Step 4

Alright, our foundation is laid, we are now ready to install SuiteCRM itself!

First, download the latest version of SuiteCRM here. I downloaded SuiteCRM 7.3.2 MAX. Note that, at the time of writing, Sales Agility only provides SuiteCRM as a .ZIP download, meaning, if like me you started with a fresh Ubuntu install, you will need to:

$ sudo apt-get install unzip

On Ubuntu, your Apache web server document root will point to /var/www/html, so let us unzip the SuiteCRM archive there.

$ cd /var/www/html
$ sudo unzip ~/SuiteCRM-7.3.2\
$ sudo mv SuiteCRM-7.3.2 suitecrm

First things first, secure your SuiteCRM installation. Notice that Ubuntu’s Apache2 package out-of-the-box runs the Apache web server under user www-data and group www-data.

$ cd suitecrm
$ sudo chown -R www-data:www-data .
$ sudo chmod -R 755 .
$ sudo chmod -R 775 cache custom modules themes
$ sudo chmod -R 775 data upload config_override.php

Step 5

SuiteCRM comes with a handy built-in installer, which you access via your web browser. If like me you are logged in via a text-based terminal session, you will need to find out your server’s IP address. For this tutorial’s sake, let us assume the IP address of the Ubuntu server is If you don’t know the actual IP address of your server, this should point you in the right direction:

$ sudo networkctl status

Alright, open your favourite web browser, and surf to If you followed the above steps correctly, you will see the “Welcome to the SuiteCRM 7.3.2 Setup Wizard” page.

Screenshot of the SuiteCRM Installation Wizard

Choose your preferred language at the bottom of the page, and click the Next button.

Read the “Step 1 of 8 – Pre-Installation requirements” page. If you’ve followed the instructions from the top, you should be covered, so click the Next button to go to step 2.

Read and accept the license agreement on the “Step 2 of 8 – License Agreement” page, and click the Next button.

On the “Step 3 of 8 – Installation Type” page, select “Typical Install”, and click the Next button.

The “Step 4 of 8 – Database Selection” page list the database types you can use. If you installed MariaDB as per the instructions above, you should select “MySQL (mysqli extension)”, and click the Next button.

The next page, “Step 5 of 8 – Database Configuration”, requires a bit more information. Remember all the database preparation we did in Step 3 of this tutorial? I hope you do, because this is the page where you need to enter those details!

The first field asks for a name for the SuiteCRM database. It defaults to “suitecrm”, but we set it to “suitecrmdb” above, so change the field here to “suitecrmdb” as well.

The second field refers to the server running the database. I’m installing everything on a single server, so I will use “localhost”.

The third and fourth field are for the name of the SuiteCRM database owner, and the corresponding password. If you followed the instructions in Step 3, the SuiteCRM database owner is called “suitecrmdbo”, and its password is “P@ssw0rd”.

As we’ve already created a database owner and database previously, choose “Same as Admin user” from the dropdown box. In case you are wondering why I went through the pains of manually creating a database owner and database: in theory you should be able to use the “Define user to create” selection from the dropdown box here, but for whatever reason that didn’t work for me. :-p

Finally, you can choose to populate the SuiteCRM database with demo data. Choose what fits your requirements. I did’t need demo data, so I selected “No” from the dropdown box.

Carefully review all the settings on this page, and click the Next button. You will need to confirm that the SuiteCRM installer can overwrite the SuiteCRM database, or more precisely, drop any existing tables inside the database. As we are configuring a fresh SuiteCRM installation, we can safely click on “I Accept” to continue.

If all went well, you should now be at the “Step 6 of 8 – Site Configuration” page, where you specify the SuiteCRM administrator account. I like “admin”, choose whatever you like, and specify a password (twice). Click “Next” to go to the next page.

On the “Step 7 of 8 – Confirm Settings”, do exactly that, review all the settings carefully. Notice the information about setting up crontab at the bottom of the page, we will do that later on. If you’re satisfied with all the settings, click the “Install” button.

After a couple of second, you should be rewarded for your hard work with the last page “Step 8 of 8 – Installation Successful”. If you click the “Next” button, you can log in into your brand new SuiteCRM instance. Use the SuiteCRM admin account and password you entered on page 6 of the installation wizard.

Configuring and using SuiteCRM itself is not in within the scope of this tutorial, and is pretty straightforward anyway. Read the SuiteCRM wiki, and check the forums if you require assistance.

Congratulations, you now have SuiteCRM up and running!

Step 6 (optional)

For bonus points, let’s schedule the SuiteCRM tasks, so they get executed as required.

$ sudo crontab -e

If this is the first time you used crontab, it will ask you to choose an editor. Choose whichever one you prefer. I went for “vim.basic”. Add this line at the bottom of the crontab file:

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

Save your changes, and exit. The crontab line above will run the SuiteCRM scheduler every minute, and execute any due tasks.


me About the author:

Hi, my name is Koen. I have been passionate about IT since I was a little kid writing silly programs on a Tandy TRS-80. In my professional career, so far I’ve worked as a Field Support Engineer, System Administrator, Webmaster, Developer, Solutions Architect, Project Manager, and currently I’m the IT Manager at Besides IT, I like creativity and innovation. Feel free to visit if you want to know more!