How to install and configure SuiteCRM with OPcache on an Ubuntu 14.04 VPS

SuiteCRM is a fork of the popular open source SugarCRM Community Edition.

To install SuiteCRM on an Ubuntu VPS follow the very easy steps described below.

Make sure your Ubuntu 14.04 Linux VPS is fully up to date using:

apt-get update
apt-get upgrade

At the time of writing this tutorial, the latest stable version of SuiteCRM is 7.1.5 and it requires:

Download the latest version of SuiteCRM available at https://suitecrm.com/download to the /opt directory on the server. Then, extract it and move the SuiteCRM files and directories to the ‘/var/www/html/suitecrm’ directory using the following commands:

unzip SuiteCRM-7.1.5\ MAX.zip
mv suitecrm-7.1.5-max/ /var/www/html/
cd /var/www/html/
mv suitecrm-7.1.5-max suitecrm

SuiteCRM requires a database to work as this is where data is saved, so create a new ‘suitecrmdb’ MySQL database on your server:

mysql -u root -p
mysql> CREATE DATABASE suitecrmdb;
mysql> CREATE USER suitecrm@localhost;
mysql> SET PASSWORD FOR 'suitecrm'@'localhost' = PASSWORD("suitecrm-password");
mysql> GRANT ALL PRIVILEGES ON suitecrmdb.* TO 'suitecrm'@'localhost' IDENTIFIED BY 'suitecrm-password' WITH GRANT OPTION;
mysql> quit

In order to enhance SuiteCRM performance, make sure some caching mechanism like APC, Memcache, Redis, Zend OPcache etc. is configured for your SuiteCRM instance. Since APC doesn’t support PHP 5.5, you could use PHP 5.5’s built-in opcode cache instead.

To enable Zend OPcache, edit the ‘/etc/php5/apache2/php.ini’ configuration file and add/modify the following settings:


Also, add/modify the following lines to the ‘/etc/php5/apache2/php.ini’ file:

memory_limit = 128M
upload_max_filesize = 20M

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘suitecrm.conf’:

touch /etc/apache2/sites-available/suitecrm.conf
ln -s /etc/apache2/sites-available/suitecrm.conf /etc/apache2/sites-enabled/suitecrm.conf
vi /etc/apache2/sites-available/suitecrm.conf

then, add the following lines:

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/suitecrm/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/suitecrm/>
Options FollowSymLinks
AllowOverride All
ErrorLog /var/log/apache2/yourdomain.com-error_log
CustomLog /var/log/apache2/yourdomain.com-access_log common

Enable PHP Opcache using the following command:

php5enmod opcache

Restart the Apache web server for the changes to take effect:

service apache2 restart

The web server user (www-data) needs to be able to write to the SuiteCRM files and directories inside the ‘custom’, ‘cache’, ‘modules’ and ‘upload’ directories and SuiteCRM configuration file (config.php), so it can easily be accomplished by executing the following command:

chown www-data:www-data -R /var/www/html/suitecrm/

In order to run SuiteCRM schedulers, run ‘crontab -e’ and add the following line to the crontab file:

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

Restart Cron service:

service cron restart

Start the web based SuiteCRM installer by opening http://your-domain.com in your favorite web browser, then follow the easy instructions.


That is it. The SuiteCRM installation is now complete. Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install SuiteCRM for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.


Categories: Tutorials

View Comments

Leave a Comment