Thursday, July 18, 2024
HomeHow toHow to Install vTiger CRM on Ubuntu 24.04

How to Install vTiger CRM on Ubuntu 24.04

vTiger is an all-in-one CRM (Customer Relationship Management) solution for your business. It is suitable for small and medium enterprises. vTiger CRM provides various tools for customers and users, which increase your business operation.

The vTiger CRM provides two solutions: the vTiger CRM cloud solution, which you can pay for all management and additional features, and the vTiger CRM open-source version, which you can self-host on your server.

In this guide, we’ll walk you through the installation of vTiger CRM on an Ubuntu 24.04 server. You’ll install and run vTiger with the LAMP Stack (Linux, Apache, MySQL/MariaDB, and PHP), then secure vTiger with HTTPS.

Prerequisites

Before you begin, make sure you have the following:

An Ubuntu 24.04 server. A non-root user with administrator privileges. A domain name pointed to the server IP address.

Installing dependencies

vTiger is an open-source CRM software based on PHP and MySQL/MariaDB. You need to install LAMP or LEMP Stack on your system to install it. In this example, you will run vTiger with the LAMP Stack on your Ubuntu system.

Firstly, run the following command to update your Ubuntu package index.

sudo apt update

Now install the LAMP Stack (Linux, Apache2, MySQL/MariaDB, and PHP) packages with the following command. Enter Y to confirm the installation.

sudo apt install apache2 mariadb-server php libapache2-mod-php php-common php-sqlite3 php-json php-curl php-intl php-mbstring php-xmlrpc php-mysql php-gd php-xml php-cli php-zip php-soap php-imap php-bcmath wget unzip -y

After the installation is finished, check the Apache web server status with the following:

sudo systemctl is-enabled apache2
sudo systemctl status apache2

You can see below the Apache web server is enabled and active(running).

Check the MariaDB service status with the following:

sudo systemctl is-enabled mariadb
sudo systemctl status mariadb

You will see the MariaDB server status active(running) and enabled.

Lastly, check the PHP version using the command below. The PHP 8.3 should be installed on your Ubuntu system.

sudo php -v

Configuring PHP

After installing dependencies, you’ll be setting up PHP installation by editing the config file php.ini.

Open the default PHP configuration /etc/php/8.3/apache2/php.ini with the following nano editor.

sudo nano /etc/php/8.3/apache2/php.ini

Change the default settings like the following – make sure to adjust the memory_limit and date.timezone options as needed.

memory_limit = 512M
upload_max_file_size = 100M
log_errors = Off
max_execution_time = 100
date.timezone = Europe/Amsterdam

When finished, save the file and exit the editor.

Now run the following command to restart the Apache web server and apply your PHP configuration.

sudo systemctl restart apache2

Configuring MariaDB server

In this section, you’ll be securing the installation of the MariaDB server. Then, a new database and user will be created that vTiger CRM will use. You’ll be using mariadb-secure-installation to secure MariaDB and using the mariadb client to create a new database and user.

To configure the MariaDB server, open the file /etc/mysql/maridb.conf.d/50-server.conf with the following nano editor command.

sudo nano /etc/mysql/maridb.conf.d/50-server.conf

In the [mysqld] section, add the following line:

sql_mode = ""

Save the file and exit the editor.

Now run the command below to restart the MariaDB server and apply your changes.

sudo systemctl status mariadb

Next, you will need to secure the MariaDB installation with the mariadb-secure-installation utility. Execute it like the following:

sudo mariadb-secure-installation

You’ll be asked about the following configurations:

  • press enter to confirm and set up the MariaDB deployment.
  • Input Y to change the authentication method to unix_socket.
  • Input Y to set up the root password for MariaDB and type the new strong password.
  • Input Y to remove the default anonymous user from the MariaDB server.
  • For the disable remote login for the root user, input Y again to confirm.
  • Now remove the default database test from the MariaDB server.
  • Lastly, input Y again to reload all table privileges.

Now that you’ve secured the MariaDB server, you’ll create a new database and user that vTiger CRM will use. Log in to the MariaDB server with the mariadb command below.

Enter your MariaDB root password when asked.

sudo mariadb -u root -p

Run the following queries to create a new database and user for vTiger. In this example, you will create a new database vtigerdb, and a new user vtiger with the password password.

CREATE DATABASE vtigerdb;
CREATE USER vtiger@localhost IDENTIFIED BY ‘password’;
GRANT ALL ON vtigerdb.* TO vtiger@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES;

Now run the query below to check privileges for user vtiger. Make sure user vtiger can access the database vtigerdb.

SHOW GRANT FOR vtiger@localhost;

Type quit to exit from the MariaDB server.

Downloading vTiger source code

Now that you’ve configured both PHP and MariaDB, you’ll download the vTiger source code and set up the document root directory with proper permission and ownership.

Go to the /var/www directory and download the vTiger source with the wget command below. Visit the vTiger CRM download page to grab the link for the latest version.

cd /var/www/
wget https://sourceforge.net/projects/vtigercrm/files/vtiger CRM 8.2.0/Core Product/vtigercrm8.2.0.tar.gz/download

Now run the command below to extract the vTiger source code. With this, your document root directory for vTiger should located in the /var/www/vtiger directory.

tar -xf download

Lastly, change ownership of the /var/www/vtigercrm directory to user www-data and the default permission to 0755.

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

Adding Apache virtual host

After downloading the vTiger source code, you’ll be creating a new Apache virtual host for running vTIger. Make sure you have your domain name ready and pointed to your server IP address.

First, run the command below to enable the rewrite and headers modules on the Apache web server.

sudo a2enmod rewrite headers

Create a new virtual host configuration /etc/apache2/sites-available/vtiger.conf with the nano command below.

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

Add the configuration below and make sure to change the domain name with your domain.


    ServerName crm.hwdomain.io
    DocumentRoot /var/www/vtigercrm

     
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     

     ErrorLog /var/log/apache2/vtigercrm_error.log
     CustomLog /var/log/apache2/vtigercrm_access.log combined

When finished, save and exit the file.

Now run the command below to activate the virtual host file vtiger.conf and verify your Apache syntax. If you have proper Apache syntax, you will get an output Syntax is OK.

sudo a2ensite vtiger.conf
sudo apachectl configtest

Lastly, restart the Apache web server to apply your changes with the following – With this, your vTiger installation is ready.

sudo systemctl restart apache2

Securing vTiger with HTTPS

To secure vTiger, you’ll set up HTTPS through Certbot and Letsencrypt. With this, you can generate SSL/TLS certificates and set up HTTPS automatically on your Apache virtual host.

Install the certbot and python3-certbot-apache plugin with the following command. Type Y to confirm the installation.

sudo apt install certbot python3-certbot-apache

After the installation is complete, generate new SSL/TLS certificates for your vTiger domain name with the following. Make sure to change both your email address and domain name with your information.

sudo certbot –apache –agree-tos –redirect –hsts –staple-ocsp –email [email protected] -d crm.hwdomain.io

When the process is complete, your SSL/TLS certificates will be available in the /etc/letsencrypt//live/domain.com directory. And your vTiger installation will be secured with HTTPS.

Installing vTiger CRM

Visit the domain name of your vTiger installation, such as https://crm.hwdomain.io/; you will see the vTiger installation wizard.

Click Install to start the installation.

Click I Agree to confirm the license and terms of vTiger CRM.

Now, ensure your system is ready for the vTiger CRM installation. Ensure the status for all requirements is Yes, then click Next.

Input details MariaDB database name, user, and password. Then input a new administrator user for vTiger installation. click Next to confirm.

Check again the detailed installation for vTiger CRM and click Next.

Leave the anonymous data collection section as default and click Next.

Now, the vTigr CRM installation will begin.

When the installation is complete, select modules as needed and click Next to continue.

Now you will be redirected to the vTiger CRM dashboard like the following:

On the vTiger administration settings, you can see detailed information related to your vTiger CRM installation and configuration.

Conclusion

Congratulations! You have completed the vTiger CRM installation on the Ubuntu 24.04 server. You have vTiger CRM up and running with the LAMP Stack (Linux, Apache, MySQL/MariaDB, and PHP) and secured with HTTPS through Certbot and Letsencrypt.


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Most Popular