Setting up Vtiger CRM on a Linux server involves several steps to install the required dependencies, configure the environment, and deploy the CRM application. Here’s a guide for setting up Vtiger CRM on an Ubuntu Linux server:
Before starting, ensure all your packages are up-to-date:
sudo apt update
sudo apt upgrade -y
Vtiger CRM typically requires Apache as the web server, MySQL (or MariaDB) as the database, and PHP. You can install these with:
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql php-curl php-xml php-mbstring php-zip php-gd -y
Secure the MySQL installation:
sudo mysql_secure_installation
Follow the prompts to set a root password and remove insecure settings.
Create a MySQL Database and User for Vtiger:
sudo mysql -u root -p
Inside the MySQL shell:
CREATE DATABASE vtigercrm;
CREATE USER 'vtigeruser'@'localhost' IDENTIFIED BY 'your_password_here';
GRANT ALL PRIVILEGES ON vtigercrm.* TO 'vtigeruser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
wget to download directly:wget https://sourceforge.net/projects/vtigercrm/files/latest/download -O vtigercrm.zip
sudo apt install unzip -y
unzip vtigercrm.zip
sudo mv vtigercrm /var/www/html/vtigercrm
Set permissions so that Apache can read and write to the Vtiger CRM directory:
sudo chown -R www-data:www-data /var/www/html/vtigercrm
sudo chmod -R 755 /var/www/html/vtigercrm
Create a new Apache configuration file for Vtiger CRM:
sudo nano /etc/apache2/sites-available/vtigercrm.conf
Add the following configuration:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/vtigercrm
ServerName your_domain_or_ip
<Directory /var/www/html/vtigercrm/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/vtigercrm_error.log
CustomLog ${APACHE_LOG_DIR}/vtigercrm_access.log combined
</VirtualHost>
Enable the site and the rewrite module:
sudo a2ensite vtigercrm.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
http://your_domain_or_ip.vtigercrm, vtigeruser, and your password).Consider securing your Vtiger instance with SSL. You can obtain a free SSL certificate from Let’s Encrypt:
sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d your_domain_or_ip
To automate tasks within Vtiger, set up a cron job:
sudo crontab -e
Add this line:
* * * * * cd /var/www/html/vtigercrm; php -f vtigercron.php > /dev/null 2>&1