Install SuiteCRM on Ubuntu 17.04 | 17.10 with Apache2, MariaDB and PHP

SuiteCRM is an open source alternative to the popular customer relationship management (CRM) software, SugarCRM. SuiteCRM became popular when SugarCRM decided to stop development of its opensource version of their popular application.
Now, SuiteCRM continues to innovate and extend its software.. and if you’re looking for a functional, high performance CRM platform to interact with your customers, you’ll find it in SuiteCRM. This brief tutorial is going to show you how to install SuiteCRM on Ubuntu with Apache2, MariaDB and PHP support.
This post covers installing the latest version of SuiteCRM, which at the time of writing was at version 7.9.6.
To get started with installing SuiteCRM, follow the steps below:
Step 1: Install Apache2
SuiteCRM requires a webserver to function and the most popular webserver in use today is Apache2. So, go and install Apache2 on Ubuntu by running the commands below:
sudo apt-get install apache2
After installing Apache2, run the commands below to disable directory listing.
sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/apache2/apache2.conf
Next, run the commands below to stop, start and enable Apache2 service to always start up with the server boots.
sudo systemctl stop apache2.service sudo systemctl start apache2.service sudo systemctl enable apache2.service
Step 2: Install MariaDB
SuiteCRM also requires a database server to function.. and MariaDB database server is a great place to start. To install it run the commands below.
sudo apt-get install mariadb-server mariadb-client
After installing, the commands below can be used to stop, start and enable MariaDB service to always start up when the server boots.
sudo systemctl stop mariadb.service sudo systemctl start mariadb.service sudo systemctl enable mariadb.service
After that, run the commands below to secure MariaDB server.
sudo mysql_secure_installation
When prompted, answer the questions below by following the guide.
- Enter current password for root (enter for none): Just press the Enter
- Set root password? [Y/n]: Y
- New password: Enter password
- Re-enter new password: Repeat password
- Remove anonymous users? [Y/n]: Y
- Disallow root login remotely? [Y/n]: Y
- Remove test database and access to it? [Y/n]: Y
- Reload privilege tables now? [Y/n]: Y
Restart MariaDB server
sudo systemctl restart mariadb.service
Step 3: Install PHP and Related Modules
SuiteCRM also requires PHP to function. To install PHP and related modules run the commands below
sudo apt-get install php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-mcrypt php-ldap php-zip php-curl
Open PHP default configuration file and make the below changes.
sudo nano /etc/php/7.1/apache2/php.ini
Then edit the below lines to look like this and save the file.
upload_max_filesize = 100 cgi.fix_pathinfo=0 session.save_path = "/var/lib/php/session"
Step 4: Create SuiteCRM Database
Now that you’ve install all the packages that are required, continue below to start configuring the servers. First run the commands below to create SuiteCRM database.
Run the commands below to logon to the database server. When prompted for a password, type the root password you created above.
sudo mysql -u root -p
Then create a database called suitecrm
CREATE DATABASE suitecrm;
Create a database user called magentouser with new password
CREATE USER 'suitecrmuser'@'localhost' IDENTIFIED BY 'new_password_here';
Then grant the user full access to the database.
GRANT ALL ON suitecrm.* TO 'suitecrmuser'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;
Finally, save your changes and exit.
FLUSH PRIVILEGES; EXIT;
Step 5: Download SuiteCRM Latest Release
Next, visit SuiteCRM site and register for a free account. You must register before you’re allowed to download a copy. The community edition is what you’ll want to download.
After downloading, run the commands below to extract the download file into Apache2 root directory.
sudo apt-get install git cd /tmp && git clone https://github.com/salesagility/SuiteCRM.git suitecrm sudo mv suitecrm /var/www/html/suitecrm/
Change or modify the directory permission to fit Apache2 configuration.
sudo chown -R www-data:www-data /var/www/html/ sudo chmod -R 755 /var/www/html/
Step 6: Configure Apache2
Finally, configure Apahce2 site configuration file for SuiteCRM. This file will control how users access Moodle content. Run the commands below to create a new configuration file called suitecrm.conf
sudo nano /etc/apache2/sites-available/suitecrm.conf
Then copy and paste the content below into the file and save it. Replace the highlighted line with your own domain name and directory root location.
<VirtualHost *:80> ServerAdmin admin@mysuitecrm.com DocumentRoot /var/www/html/suitecrm/ ServerName example.com ServerAlias www.example.com <Directory /var/www/html/suitecrm/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Save the file and exit.
Step 7: Enable the SuiteCRM and Rewrite Module
After configuring the VirtualHost above, enable it by running the commands below
sudo a2ensite suitecrm.conf sudo a2enmod rewrite
Step 8 : Restart Apache2
To load all the settings above, restart Apache2 by running the commands below.
sudo systemctl restart apache2.service
Then open your browser and browse to the server domain name. You should see SuiteCRM setup wizard to complete. Please follow the wizard carefully.

Then enter the database information as well as the site administrator login credentials.

Wait and SuiteCRM should install successfully. Login and begin using your program.
Enjoy!

You may also like the post below:
I followed everything, even pasted most of the code into the terminal. when i go to access my domain it just throws me somewhere else.
Make sure to use your own domain… example.com should be replaced with your own domain in Apache2 vhost configuration…
I did. I used johnnytestdb.com (www.johnnytestdb.com) on the server name and allias, and it it wont even act as if i’m connecting anywhere. I tried it again and pasted everything minus the stuff i needed to change like usernames and passwords and it doesn’t work.
Should be a simple setup… Are you even getting the setup page when you browse to the server name?
that is precisely the problem. on the suitecrm.conf file that i’m supposed to make i’m supposed to change ServerName and ServerAllias, right? to something of my own choosing? I do that, and it wont even bring up the installation wizard. I just did it again from a fresh ubuntu install and the same thing happened.
You can test by replacing your domain name with the server IP address… then test with connecting the server IP..
It might be worth updating this with a section explaining that you need to run composer install if you download the suitecrm files from a git repo
yes, this is my problem.