LinuxTutorialsUbuntu

How To Install Vtiger CRM on Ubuntu 20.04 LTS

Install Vtiger CRM on Ubuntu 20.04

In this tutorial, we will show you how to install Vtiger CRM on Ubuntu 20.04 LTS. For those of you who didn’t know, Vtiger is an open source CRM that enables support, sales, marketing teams to collaborate and organize to boost business growth and improve customer delight. Vtiger CRM also includes email, inventory, project management, and other tools, providing a complete business management suite.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Vtiger CRM on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 20.04, 18.04, and any other Debian-based distribution like Linux Mint or elementary OS.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Vtiger CRM on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing the LAMP stack.

A Ubuntu 20.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.

Step 3. Installing Vtiger CRM on Ubuntu 20.04.

By default, Vtiger is not available on Ubuntu 20.04 base repository. Now we download the latest version of the Vtiger CRM with the following command below:

wget https://onboardcloud.dl.sourceforge.net/project/vtigercrm/vtiger%20CRM%207.4.0/Core%20Product/vtigercrm7.4.0.tar.gz

Next, extract the downloaded file:

sudo tar xvf vtigercrm7.4.0.tar.gz

After that, move extracted folder to the installation directory:

sudo mkdir /var/www/vtigercrm
sudo mv vtigercrm/* /var/www/vtigercrm

We will need to change some folders permissions:

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

Step 4. Configuring MariaDB.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- 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

Next, we will need to log in to the MariaDB console and create a database for the Vtiger CRM. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Vtiger CRM installation:

MariaDB [(none)]> CREATE DATABASE vtigercrmdb;
MariaDB [(none)]> CREATE USER 'vtigercrmusr'@'localhost' IDENTIFIED BY 'your-strong-password';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON vtigercrmdb.* TO 'vtigercrmusr'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT

Step 5. Configuring Apache.

Now we create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘vtiger.conf’ on your virtual server:

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

Add the following lines:

<VirtualHost *:80>
     ServerAdmin admin@your-domain.com
     DocumentRoot /var/www/vtigercrm
     ServerName your-domain.com

     <Directory /var/www/vtigercrm/>
          Options +FollowSymlinks
          AllowOverride All
          Require all granted
     </Directory>
     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Save and close the file, then restart the Apache webserver so that the changes take place:

sudo a2ensite vtiger.conf
sudo a2enmod rewrite
sudo systemctl restart apache2

Step 6. Set up HTTPS.

We should enable a secure HTTPS connection on Vtiger CRM. We can obtain a free TLS certificate from Let’s Encrypt. Install Let’s Encrypt client (certbot) from Ubuntu 20.04 repository:

sudo apt install certbot python3-certbot-apache

Next, run the following command to obtain a free TLS certificate using the Apache plugin:

certbot --apache -d your-domian.com

You will be asked to provide your email and accept the term of service:

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/vtiger.conf to ssl vhost in /etc/apache2/sites-available/vtiger-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://your-domain.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=your-domain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/invoice.your-domain.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/invoice.your-domain.com/privkey.pem
   Your cert will expire on 2022-04-23. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

If the test is successful, reload Apache for the change to take effect:

sudo apache2ctl -t
sudo systemctl reload apache2

Step 7. Accessing Vtiger CRM Web Interface.

Once successfully installed, open your web browser and access the Vtiger CRM web interface using the URL https://your-domain.com. You should see the following page:

Install Vtiger CRM on Ubuntu 20.04 LTS Focal Fossa

Congratulations! You have successfully installed Vtiger CRM. Thanks for using this tutorial for installing the Vtiger CRM (Custom Relationship Management) on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official Vtiger CRM website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button