RHEL BasedRocky Linux

How To Install Vtiger CRM on Rocky Linux 9

Install Vtiger CRM on Rocky Linux 9

In this tutorial, we will show you how to install Vtiger CRM on Vtiger on Rocky Linux 9. CRM is a powerful, open-source customer relationship management solution designed to streamline sales, marketing, and support processes. Managing customer interactions efficiently is crucial for business success. Rocky Linux 9 offers a stable and robust platform for deploying Vtiger CRM. This guide provides a comprehensive, step-by-step approach to installing and configuring Vtiger CRM on Rocky Linux 9, ensuring optimal performance and security.

This tutorial is tailored for system administrators, developers, and IT professionals. Basic familiarity with Linux commands, server administration, and database management will be beneficial. Follow along to harness the full potential of Vtiger CRM on Rocky Linux 9.

Prerequisites

Before proceeding with the installation, ensure your system meets the necessary requirements and that you possess the required skills.

System Requirements

  • Minimum Hardware Specifications: Ensure your server meets the minimum hardware requirements for Vtiger CRM to function efficiently. A minimum of 4GB RAM, a dual-core CPU, and 20GB of storage is recommended.
  • Operating System Requirements: This guide is specifically for Rocky Linux 9. Verify that your system is running this operating system. Instructions may vary for other distributions.
  • Network Connectivity Needs: A stable network connection is required to download packages and updates during the installation process. Ensure your server has internet access.

Required Skills

  • Basic Linux Command Knowledge: Familiarity with basic Linux commands such as yum, systemctl, and file manipulation commands is essential.
  • Server Administration Fundamentals: Understanding server administration concepts, including user management, file permissions, and service management, is necessary.
  • Database Management Basics: Knowledge of database management principles, particularly with MySQL or MariaDB, is required for configuring the database for Vtiger CRM.

Preparing the Environment

Preparing the environment involves updating the system, installing the LAMP stack, and configuring basic security settings. This ensures a stable foundation for Vtiger CRM.

System Updates

  1. Updating Package Repositories: Start by updating the package repositories to ensure you have the latest available packages. Run the following command:
sudo dnf update
  1. Installing System Updates: Install any available system updates to patch security vulnerabilities and improve system stability. This command updates all packages to their latest versions.
sudo dnf upgrade
  1. Configuring Basic Security Settings: Configure a firewall to protect your server from unauthorized access. Enable the firewall and allow necessary ports, such as HTTP (80) and HTTPS (443).
sudo systemctl start firewalld
 sudo systemctl enable firewalld
 sudo firewall-cmd --permanent --add-service=http
 sudo firewall-cmd --permanent --add-service=https
 sudo firewall-cmd --reload

LAMP Stack Installation

A LAMP (Linux, Apache, MySQL/MariaDB, PHP) stack is required to run Vtiger CRM. Install the necessary components using the following steps:

  1. Apache Web Server Setup: Install the Apache web server using the dnf package manager.
sudo dnf install httpd

Enable and start the Apache service:

sudo systemctl start httpd
 sudo systemctl enable httpd
  1. MySQL/MariaDB Installation: Choose either MySQL or MariaDB as your database server. This guide uses MariaDB. Install MariaDB using the following command:
sudo dnf install mariadb-server mariadb

Enable and start the MariaDB service:

sudo systemctl start mariadb
 sudo systemctl enable mariadb

Secure the MariaDB installation by running:

sudo mysql_secure_installation
  1. PHP and Required Extensions: Install PHP and the necessary extensions required by Vtiger CRM.
sudo dnf install php php-mysqlnd php-gd php-imap php-ldap php-pdo php-xml php-mbstring php-json php-curl php-opcache

Verify the installed PHP version:

php -v

Database Configuration

Configuring the database involves setting up MySQL, creating a database for Vtiger CRM, and configuring user privileges. This ensures Vtiger CRM can store and retrieve data correctly.

MySQL Setup

  1. Secure Installation Process: During the MariaDB installation, you ran mysql_secure_installation. Follow the prompts to set a root password, remove anonymous users, disallow remote root login, and remove the test database.
  2. Database Creation: Log in to the MariaDB server as the root user:
sudo mysql -u root -p

Create a new database for Vtiger CRM. Replace vtigerdb with your desired database name:

CREATE DATABASE vtigerdb;
  1. User Privileges Configuration: Create a new user for Vtiger CRM and grant the necessary privileges to the database. Replace vtigeruser with your desired username and password with a strong password:
CREATE USER 'vtigeruser'@'localhost' IDENTIFIED BY 'password';
 GRANT ALL PRIVILEGES ON vtigerdb.* TO 'vtigeruser'@'localhost';
 FLUSH PRIVILEGES;

Exit the MariaDB prompt:

EXIT;
  1. MySQL Optimization Settings: Adjust MySQL configuration settings in /etc/my.cnf.d/server.cnf to optimize performance. Add or modify the following settings:
[mysqld]
 innodb_buffer_pool_size = 256M
 innodb_log_file_size = 64M
 key_buffer_size = 32M
 max_connections = 150

Restart the MariaDB service to apply the changes:

sudo systemctl restart mariadb

PHP Configuration

Proper PHP configuration is crucial for Vtiger CRM to function correctly. Adjust the PHP settings to meet the application’s requirements.

PHP Settings

  1. Required PHP Version: Vtiger CRM requires a specific PHP version. Check the official Vtiger CRM documentation for the recommended version. As of this guide, PHP 8.2 or higher is recommended.
  2. Essential PHP Extensions: Ensure all required PHP extensions are installed. The extensions listed earlier (php-mysqlnd, php-gd, php-imap, etc.) are essential for Vtiger CRM functionality. Verify they are enabled in the php.ini file.
  3. php.ini Configuration: Modify the php.ini file to adjust settings such as memory limits and execution time. The php.ini file is typically located at /etc/php.ini or /etc/php/8.2/php.ini (depending on your PHP version).
  4. Memory Limits and Execution Time Settings: Increase the memory limit and maximum execution time in the php.ini file:
memory_limit = 256M
 max_execution_time = 300
 upload_max_filesize = 64M
 post_max_size = 64M

Restart the Apache web server to apply the changes:

sudo systemctl restart httpd

Vtiger CRM Installation

Installing Vtiger CRM involves downloading the software, extracting the files, and setting up the web directory. Follow these steps carefully to ensure a smooth installation process.

Downloading Vtiger

  1. Source Verification: Download the Vtiger CRM package from the official Vtiger CRM website or a trusted source. Verify the integrity of the downloaded file using checksums or digital signatures.
  2. Download Methods: Use wget to download the Vtiger CRM package directly to your server. Replace the URL with the actual download link:
sudo wget https://sourceforge.net/projects/vtigercrm/files/vtigerCRM%207.4.0/apache/vtigercrm7.4.0.tar.gz
  1. File Extraction Process: Extract the downloaded package to the web directory. The default web directory for Apache on Rocky Linux is /var/www/html.
sudo tar -xvzf vtigercrm7.4.0.tar.gz -C /var/www/html/

Rename the extracted directory to a more convenient name, such as vtigercrm:

sudo mv /var/www/html/vtigercrm7.4.0 /var/www/html/vtigercrm

Web Directory Setup

  1. Apache Configuration: Create an Apache virtual host configuration file for Vtiger CRM. Create a new file /etc/httpd/conf.d/vtigercrm.conf with the following content:
 <VirtualHost *:80>
  ServerName your_server_ip_or_domain
  DocumentRoot /var/www/html/vtigercrm
  <Directory /var/www/html/vtigercrm>
  Options FollowSymLinks
  AllowOverride All
  Require all granted
  </Directory>
  ErrorLog /var/log/httpd/vtigercrm_error.log
  CustomLog /var/log/httpd/vtigercrm_access.log combined
 </VirtualHost>

Replace your_server_ip_or_domain with your server’s IP address or domain name.

Restart the Apache web server to apply the changes:

sudo systemctl restart httpd
  1. Directory Permissions: Set the correct permissions for the Vtiger CRM directory to allow the web server to access the files.
sudo chown -R apache:apache /var/www/html/vtigercrm
 sudo chmod -R 755 /var/www/html/vtigercrm
  1. SELinux Considerations: If SELinux is enabled, adjust the SELinux context for the Vtiger CRM directory:
sudo chcon -t httpd_sys_rw_content_t /var/www/html/vtigercrm -R
 sudo chcon -t httpd_sys_content_t /var/www/html/vtigercrm -R

Web-based Configuration

The web-based configuration involves using the Vtiger CRM installation wizard to set up the database connection, create an administrator account, and configure initial system settings.

Installation Wizard

  1. Accessing the Installation Wizard: Open a web browser and navigate to http://your_server_ip_or_domain/vtigercrm. You should see the Vtiger CRM installation wizard.
  2. Database Connection Setup: Enter the database connection details, including the database host, database name, username, and password. Use the credentials you created earlier in the MySQL Setup section.
  3. Administrator Account Creation: Create an administrator account by providing a username, password, and email address. This account will be used to manage the Vtiger CRM system.
  4. Initial System Configuration: Configure the initial system settings, such as the organization name, currency, and timezone.
  5. Module Selection: Choose the modules you want to install. You can select all modules or customize the installation by selecting specific modules.
  6. Complete Installation: Follow the on-screen instructions to complete the installation process. The installation may take some time, depending on your server’s performance.

Install Vtiger CRM on Rocky Linux 9

Security Hardening

Security hardening is essential to protect your Vtiger CRM installation from potential threats. Implement the following security measures to enhance the security of your system.

Post-installation Security

  1. File Permissions: Ensure that sensitive files and directories have appropriate permissions. Avoid giving unnecessary write permissions to the web server user.
  2. Apache Security Settings: Configure Apache security settings to prevent common web application vulnerabilities. Disable directory listing and hide the server version.
 <Directory /var/www/html/vtigercrm>
  Options -Indexes
  </Directory>
 ServerSignature Off
 ServerTokens Prod

Add these lines to your Apache virtual host configuration file (/etc/httpd/conf.d/vtigercrm.conf) and restart the Apache web server.

  1. Firewall Configuration: Configure the firewall to allow only necessary traffic to your server. Block all other incoming and outgoing traffic.
  2. SSL/TLS Implementation: Enable SSL/TLS to encrypt communication between the client and the server. Obtain an SSL certificate from a trusted certificate authority or use Let’s Encrypt to obtain a free SSL certificate.

Install certbot:

sudo dnf install certbot python3-certbot-apache

Obtain and install the SSL certificate:

sudo certbot --apache -d your_server_ip_or_domain

Follow the prompts to complete the SSL/TLS configuration.

Performance Optimization

Optimize the performance of your Vtiger CRM installation to ensure a smooth and responsive user experience.

System Tuning

  1. Apache Optimization: Adjust Apache configuration settings to optimize performance. Increase the Timeout and KeepAliveTimeout values.
  2. PHP Performance Settings: Enable PHP OPcache to improve PHP performance. OPcache caches compiled PHP code, reducing the need to recompile code on each request.

Ensure the following lines are present and uncommented in your php.ini:

opcache.enable=1
 opcache.enable_cli=1
 opcache.memory_consumption=128
 opcache.interned_strings_buffer=8
 opcache.max_accelerated_files=10000
 opcache.revalidate_freq=2

Restart the Apache web server to apply the changes.

  1. MySQL Performance Tweaks: Optimize MySQL performance by adjusting buffer sizes and cache settings in the /etc/my.cnf.d/server.cnf file.
  2. Caching Configuration: Implement caching mechanisms to reduce database load and improve response times. Vtiger CRM supports various caching options, such as Memcached and Redis.

Troubleshooting Guide

Encountering issues during the installation or operation of Vtiger CRM is not uncommon. This section provides solutions to common problems.

Common Issues

  • Installation Errors: If you encounter errors during the installation process, check the Vtiger CRM log files for detailed error messages. The log files are typically located in the /var/log/httpd/ directory.
  • Permission Problems: Permission problems can prevent Vtiger CRM from accessing files and directories. Ensure that the web server user (apache) has the necessary permissions to read and write files in the Vtiger CRM directory.
  • Database Connectivity Issues: If you encounter database connectivity issues, verify that the database server is running and that the database connection details are correct. Check the database server’s log files for error messages.
  • Performance Bottlenecks: Performance bottlenecks can result in slow response times and poor user experience. Use performance monitoring tools to identify the cause of the bottleneck. Optimize the server configuration and database settings to improve performance.
  • Stuck on configuring the mailbox: If you are stuck on configuring the mailbox in Vtiger CRM, there may be an endless loading issue. Ensure the proper mailbox settings are configured.
  • Login Issues: Double-check your username and password. Clear your browser cache, as old preferences might interfere with the login process.

Congratulations! You have successfully installed Vtiger CRM. Thanks for using this tutorial for installing the Vtiger CRM on Rocky Linux 9 system. For additional help or useful information, we recommend you check the official Vtiger 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