How to Install Vtiger CRM on an Ubuntu 18.04 VPS

Install Vtiger CRM on Ubuntu

Vtiger CRM is a cloud-based Customer Relationship Management (CRM) platform that aids interactions between the company and its customers.  It provides an intuitive customer experience and delivers outstanding performance for marketing, sales, and support teams which in return provides better customer retention for the company.

Some of the key features provided by Vtiger CRM:

  • Provides API Functionality
  • Account & Contact Management
  • Customer Support Services
  • Inventory Automation
  • Reporting and Statistics
  • Social Media Integration
  • Supports Data Import and Export

Vtiger CRM offers an open-source version of its platform which is supported continuously by communities and developers. It is developed using PHP, and it utilizes Apache as a web server and MariaDB as the database server.

In this article, we will show you how to install Vtiger CRM on Ubuntu 18.04.

Prerequisites:

For this tutorial, we will be using our Ubuntu VPS service. Please make sure that your server meets the following minimum hardware and software requirements:

Hardware:

  • 2 CPU Cores
  • 2GB of RAM
  • 10GB of free disk space

Software:

  • Domain name registered and pointed to your server IP address
  • Ubuntu 18.04 or later
  • Full root access

Check for Updates and Install Dependencies

Log in to your server via SSH:

ssh [username]@[server_ip_address]

Be sure to replace “username” with the account name of a root user found on the server (or the root user itself), and replace “server_ip” with the IP address of your server.

Before starting with the installation, it is recommended to update Ubuntu packages to their latest versions:

apt-get update
apt-get upgrade

Ensure the required dependencies are installed by running the following command:

apt-get install software-properties-common build-essential unzip wget -y

Installing the LAMP Stack

1. Installing Apache2

Apache2 is the recommended web server for Vtiger. To install it, execute the following command:

apt-get install apache2

Once installed, it is best to enable the automatic startup of the Apache2 service in case of a system reboot:

systemctl enable apache2

To check if your Apache2 service is running, use the following command:

systemctl status apache2

You should see the following output:

● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)

An Apache module called “rewrite” should be enabled:

a2enmod rewrite

Restart the apache2 service to apply the changes we made:

systemctl restart apache2

2. Installing PHP v7.2

Vtiger CMS supports the latest stable version of PHP, which is PHP 7.2. Unfortunately, this is not yet the default version of PHP installed on Ubuntu 18.04, therefore we must add an additional repository. To proceed, use the following commands:

add-apt-repository ppa:ondrej/php
apt-get update

After updating the repository, use the following command to install PHP 7.2 and all libraries required for this tutorial:

apt install libapache2-mod-php7.2 php7.2 php7.2-cli php7.2-mysql php7.2-common php7.2-zip php7.2-intl php7.2-mbstring php7.2-xmlrpc php7.2-curl php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-ldap php7.2-imap php7.2-json

To verify that you are using PHP 7.2, type the following command:

php -v

You should see the following text:

PHP 7.2.15-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb  8 2019 15:38:01) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.15-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

Additional changes in Apache’s loaded default configuration file for PHP is required by Vtiger.

nano /etc/php/7.2/apache2/php.ini

Modify the following lines:

max_execution_time = 120
max_input_vars = 2000
memory_limit = 256M
post_max_size = 32M
upload_max_filesize = 64M
file_uploads = On
allow_url_fopen = On
display_errors = On
short_open_tags = Off
log_errors = Off
error_reporting = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

Save the configuration and restart the Apache web server service to apply the changes:

systemctl restart apache2

3. Installing MariaDB Server

To install the MariaDB server, use the following command.

apt-get install mariadb-server

After a successful installation, we have to apply basic security settings by using the built-in security script provided by MariaDB.

mysql_secure_installation

For all questions aside from setting the new password, answer the prompts with:

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y

To verify the version of MySQL currently installed, type the following command:

mysql -V

You should see the following text:

mysql  Ver 15.1 Distrib 10.1.38-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

3. Creating our Vtiger CRM Database

After setting up the database server, we can now continue by creating and setting up our database.

Log in to MariaDB’s CLI:

mysql -u root -p

Use the following lines to create the database (vtiger_db) and assign the user (vtiger_user) to the newly created database.

Always remember to use a strong password. Generally, a password utilizing at least 12 characters including alphanumeric and grammatical symbols is sufficient. Never use passwords based upon dictionary words or significant dates.

CREATE DATABASE vtiger_db;
CREATE USER 'vtiger_user'@'localhost' IDENTIFIED BY '[password]';
GRANT ALL PRIVILEGES ON vtiger_db.* TO 'vtiger_user'@'localhost' IDENTIFIED BY '[password]' WITH GRANT OPTION;
ALTER DATABASE vtiger_db CHARACTER SET utf8 COLLATE utf8_general_ci;
FLUSH PRIVILEGES;
EXIT;

Do not forget to replace “[password]” with your strong password.

To verify that we can access the newly created database with the new database user, run the following command:

mysql -u vtiger_user -p vtiger_db

It will ask for your database user password; once logged in you should be able to see MariaDB CLI.

To exit the CLI, type:

quit

Installing Vtiger CRM

After successfully setting up our LAMP stack, we can now download and install Vtiger CRM. At the time of writing, the latest stable version of Vtiger is 7.1.0.

First, we will need to change our directory to “/var/www/”.

cd /var/www/

After changing the current directory, we may now proceed in downloading the web files for Vtiger CRM using wget.

wget https://cfhcable.dl.sourceforge.net/project/vtigercrm/vtiger%20CRM%207.1.0/Core%20Product/vtigercrm7.1.0.tar.gz

After the download has been successfully completed, we can then extract the GZ file using the following command:

tar -xvzf vtigercrm7.1.0.tar.gz

Remove the downloaded file after unzipping:

rm vtigercrm7.1.0.tar.gz

We need to ensure that the file and folder permissions are correct:

chown -R www-data:www-data /var/www/vtigercrm/
chmod 755 /var/www/vtigercrm/

Creating a Virtual Host

For our Vtiger installation, it is best to create a dedicated Apache virtual host configuration, which not only makes our setup more organized, but this also allows your server to be used for other purposes, in case you’d need to set up other websites in the future.

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer
NVME 2 VPS

Now just $43 .99
/mo

GET YOUR VPS

Create and modify the following file:

nano /etc/apache2/sites-available/vtigercrm.conf

Paste the following (modify according to your server’s parameters):

<VirtualHost *:80>

     ServerName vtiger-dev.yourdomainhere.com
     ServerAlias www.vtiger-dev.yourdomainhere.com

     ServerAdmin admin@vtiger-dev.yourdomainhere.com

     DocumentRoot /var/www/vtigercrm/

     ErrorLog ${APACHE_LOG_DIR}/vtiger-dev.yourdomainhere.com-error.log
     CustomLog ${APACHE_LOG_DIR}/vtiger-dev.yourdomainhere.com-access.log combined

     <Directory /var/www/vtigercrm/>
          Options FollowSymlinks
          AllowOverride All
          Order allow,deny
         Allow from all
     </Directory>

</VirtualHost>

Once done, save the file and execute the following commands to activate that changes that we have made:

a2ensite vtigercrm.conf
systemctl restart apache2

You can now visit your website and proceed with the initial setup, which should look like this.

That’s it – you now have a working CRM platform powered by Vtiger on your Ubuntu 18.04 server.


Of course, you don’t have to install Vtiger CRM on Ubuntu 18.04 if you have an Ubuntu VPS with us. You can simply ask our support team to install Vtiger CRM on Ubuntu 18.04 for you. They are available 24/7 and will be able to help you with the installation.

PS. If you enjoyed reading this blog post on how to install Vtiger CRM on Ubuntu 18.04, feel free to share it on social networks using the shortcuts below, or simply leave a comment in the comments section. Thanks.

5 thoughts on “How to Install Vtiger CRM on an Ubuntu 18.04 VPS”

  1. I have installed successfully on Ubuntu 20.04 LTS. I can reach the vtiger installation hosted in cloud. The issue is that when I attempt to install it states that it cannot reach the MYSQL. The settings are confirmed to be correct, any idea? – Thanks!

    Reply

Leave a Comment