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

suitecrm 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:

  • PHP with GD graphics library, cURL, IMAP, mbstring, JSON, PCRE, XML, ZLIB and ZIP PHP extensions enabled.
  • Apache Web Server >= 2.x+
  • MySQL >= 5.x installed on your Linux virtual server.

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> FLUSH PRIVILEGES;
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:

[opcache]
opcache.enable=1
opcache.max_accelerated_files=1000
opcache.memory_consumption=128

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

memory_limit = 128M
upload_max_filesize = 20M
extension=curl.so
extension=imap.so

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
</Directory>
ErrorLog /var/log/apache2/yourdomain.com-error_log
CustomLog /var/log/apache2/yourdomain.com-access_log common
</VirtualHost>

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.

suitecrm back-end

 

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 Ubuntu 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.

 

3 thoughts on “How to install and configure SuiteCRM with OPcache on an Ubuntu 14.04 VPS”

  1. I’ve run the these installation steps three times now, (at different times) and I keep getting the same error during initial setup: “The passwords provided for the SuiteCRM database user do not match. Please re-enter the same passwords in the password fields.”

    Google searches mention a few methods to fix it, none of which work. Apparently, this bug is also in SugarCRM.

    Any ideas?

    Thanks in advance.

    Reply
  2. If you want to wget SuiteCRM directly on to the server use the following

    wget http://heanet.dl.sourceforge.net/project/suitecrm/SuiteCRM-7.4.3.zip

    Reply

Leave a Comment