Install Vtiger CRM on Ubuntu Server 24.04

Detailed step-by-step guide to install open-source Vtiger CRM on a self-hosted Ubuntu 24.04 server.

Installation Guide

Follow our Step-by-Step Instructions
  1. Update the System

    Run the following commands to update and upgrade the system packages:

    sudo apt update -y
    sudo apt upgrade -y
  2. Install Apache Web Server

    Install Apache using the following command:

    sudo apt install apache2 -y
  3. Install MySQL Database Server

    Install MySQL using the following command:

    sudo apt install mysql-server -y

    Secure the MySQL installation by setting a strong password and removing unnecessary permissions and databases:

    sudo mysql_secure_installation
  4. Install PHP and Required Modules

    Install PHP along with the necessary modules using the following command:

    sudo apt install php libapache2-mod-php php-mysql php-curl php-json php-cgi php-imap php-cli php-gd php-zip php-mbstring php-xml -y

    Configure PHP by editing the php.ini file:

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

    Modify the following lines in the php.ini file:

    memory_limit = 256M
    max_execution_time = 60
    error_reporting = E_ERROR & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
    display_errors = Off
    short_open_tag = Off
  5. Create a MySQL Database and User for vTiger

    Log in to MySQL using the following command:

    sudo mysql -u root -p

    Create a new database and user for vTiger:

    CREATE DATABASE vtiger;
    CREATE USER 'ravi'@'localhost' IDENTIFIED BY 'your_password';
    GRANT ALL PRIVILEGES ON vtiger.* TO 'ravi'@'localhost';
    FLUSH PRIVILEGES;
    EXIT;

    Note: Replace your_password with a strong password of your choice.

  6. Download and Extract vTiger CRM

    Navigate to the /tmp directory and download the latest version of vTiger CRM:

    cd /tmp
    wget  https://www.gen-x.co.za/downloads/vtigercrm8.4.0.tar.gz

    Extract the downloaded file and move the extracted files to the Apache web root directory:

    tar -xvzf vtigercrm.tar.gz
    sudo mv vtigercrm /var/www/html/

    Set the correct permissions for the vTiger CRM directory:

    sudo chown -R www-data:www-data /var/www/html/vtigercrm
    sudo chmod -R 755 /var/www/html/vtigercrm
  7. Create vTiger CRM Apache Configuration File

    Create a new Apache configuration file for vTiger CRM:

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

    Add the following content to the file:

    <VirtualHost *:80>
        ServerAdmin admin@example.com
        DocumentRoot /var/www/html/vtigercrm
        ServerName your_domain.com
        <Directory /var/www/html/vtigercrm>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/vtigercrm_error.log
        CustomLog ${APACHE_LOG_DIR}/vtigercrm_access.log combined
    </VirtualHost>

    Note: Replace your_domain.com with your domain name or IP address.

    Save and close the file. Enable the new site, rewrite the module, and restart the Apache service:

    sudo a2ensite vtigercrm.conf
    sudo a2enmod rewrite
    sudo systemctl restart apache2
  8. Complete vTiger CRM Installation via Web Browser

    Open a web browser and navigate to http://your_domain.com or http://your_server_IP. You will be redirected to the vTiger CRM installation wizard.

    Ensure all server requirement checks are green before proceeding.

    Enter the database details you created earlier (database name: vtiger, username: ravi, and the password).

    Set up the admin user credentials.

    Follow the on-screen instructions to complete the installation.

Notes:

  • Replace your_password with a strong password of your choice.
  • Replace your_domain.com with your domain name or IP address.
  • For further customization and configuration, refer to the vTiger CRM documentation.