Vtiger CRM Installation
I am testing Vtiger CRM 5.2.1 so I decide to write this HowTo for installing it and get the CRM up and running.
If you check on the Vtiger Downloads page you'll see that there are two distribution for Linux:
- vtigercrm-5.2.1.bin for beginners users
- vtigercrm-5.2.1.tar.gz oriented to advanced users that have experience with MySQL and PHP-based applications
I couldn't get the precompiled .bin distribution working on Ubuntu 10.04 so I've decided to install it from sources.
1. Install Dependency Packages
To install Vtiger first you need to install some dependencies:
$ sudo apt-get install binutils cpp flex gcc libarchive-zip-perl \ libc6-dev libcompress-zlib-perl libpcre3 libpopt-dev lynx m4 make \ ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev autoconf \ automake1.9 libtool bison autotools-dev gcc libpng12-dev libjpeg62-dev \ libfreetype6-dev libssl-dev libxml2-dev libxml2 apache2 php5-mysql \ libapache2-mod-php5 mysql-server php5-gd php5-imap
Also I like to install phpMyAdmin to manage MySQL server:
$ sudo apt-get install phpmyadmin
2. Download the sources Vtiger tarball
You can use wget to download the source, check the correct link at Vtiger Downloads page.
Then untar the tarball at /var/www/vtigercrm and change the owner:
$ cd /var/www $ sudo tar -xzvf vtigercrm-5.2.1.tar.gz
3. Change Owner and Permissions
Change the owner of vtigercrm directory:
$ sudo chown -R www-data:www-data vtigercrm
There are few files and directories that need r/w permissions, you can see the complete list at Vtiger521 Linux Installation.
For my convenience I wrote the following script:
#!/bin/bash chmod -R a+rw config.inc.php chmod -R a+rw tabdata.php chmod -R a+rw install.php chmod -R a+rw parent_tabdata.php chmod -R a+rw cache chmod -R a+rw cache/images/ chmod -R a+rw cache/import/ chmod -R a+rw storage/ chmod -R a+rw install/ chmod -R a+rw user_privileges/ chmod -R a+rw Smarty/cache/ chmod -R a+rw Smarty/templates_c/ chmod -R a+rw modules/Emails/templates/ chmod -R a+rw modules/ chmod -R a+rw cron/modules/ chmod -R a+rw test/vtlib/ chmod -R a+rw backup/ chmod -R a+rw Smarty/templates/modules/ chmod -R a+rw test/wordtemplatedownload/ chmod -R a+rw test/product/ chmod -R a+rw test/user/ chmod -R a+rw test/contact/ chmod -R a+rw test/logo/ chmod -R a+rw logs/ chmod -R a+rw modules/Webmails/tmp/
Save it as something like vtigercrm-5.2.1.chmod.sh and give it execution permission:
$ cd /var/www/vtigercrm $ sudo chmod a+x vtigercrm-5.2.1.chmod.sh $ sudo ./vtigercrm-5.2.1.chmod.sh
4. Configure a VirtualHost on Apache
Create a virtual host on the Apache server, to do that add the following vtigercrm file at /etc/apache2/site-available:
<VirtualHost *:80> ServerName crm.example.com DocumentRoot /var/www/vtigercrm # Possible vaues include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn ErrorLog /var/log/apache2/vtigercrm-error.log CustomLog /var/log/apache2/vtigercrm-access.log combined ServerSignature Off </VirtualHost>
Now enable the new site:
$ cd /etc/apache2/site-enabled $ sudo ln -s ../sites-available/vtigercrm
5. Configure MySQL Server
Review MySQL configuration file /etc/mysql/my.cnf these are the required parameters for Vtiger:
SQL_MODE Should not have STRICT_TRANS_TABLE ENGINE=InnoDB Should be available. (Turn off --skip-innodb)
Also to add UTF-8 support you need the following:
[mysql] default-character-set=utf8 [mysqld] collation_server=utf8_unicode_ci character_set_server=utf8 default-character-set=utf8 init_connect='SET collation_connection = utf8_general_ci' init_connect='SET NAMES utf8'
Restart MySQL Server:
$ sudo /etc/init.d/mysql restart
6. Configure PHP Settings
Review the PHP configuration file /etc/php5/apache2/php.ini to verify if meets the recommended values:
allow_call_time_pass_reference = on error_reporting = E_WARNING & ~E_NOTICE safe_mode = off display_errors = on file_uploads = on max_execution_time = 600 memory_limit = 64M log_errors = off output_buffering = on register_globals = off short_open_tag = On
Restart Apache Server:
$ sudo /etc/init.d/apache2 restart
7. Create a MySQL DB
With your favorite browser open phpMyAdmin at http://www.example.com/phpmyadmin/ to create a database named vtigercrmdb and a mysql user named vtigercrm which has all priveleges granted to it. Also write down the names and password as you need it later on.
8. Run Vtiger Configuration Wizard
Now it's time to start the Vtiger configuration wizard, in your favorite browser open http://crm.example.com and click on "Install" then agree with the Vtiger Public License term.
Verify that pre-installation check is fine then fill up the "System Configuration" form.
Database Information
- Database Type: MySQL
- Host Name: localhost
- User Name: vtigercrm
- Password: your-secret
- Database Name: vtigercrmdb
In case you have MySQL installed on a different server or port, you can use the following something like: mysql.example.com:3333.
Leave "Create Database" unchecked and check "Populate database with demo data" if you need some example data.
CRM Configuration
- URL: http://crm.example.com
- Currency Name: choose your currency
User configuration
- Username: admin
- Password: your-secret
- Email: your-email-address@example.com
Verify your configuration settings then confirm them.
Next choose the "Optional Modules" that you need.
Then the configuration wizard will start to setup Vtiger CRM, after a while the configuration is completed.
9. Recommended Steps
Now you can login with the admin user at http://crm.example.com and add more users from the "Settings" page, but before doing that it is important that you complete few recommended steps.
- Rename install.php file and the install directories in case the wizard didn't do it for you.
- Rename htaccess.txt file to .htaccess to control public file access
- Setup the outgoing email server from Settings->Outgoing Server
- Setup a backup server from Settings->Backup Server so that your CRM data and files are archived to another location on a daily basis
10. Install Spanish Language Pack (Optional)
Download the Spanish language pack from http://forge.vtiger.com/projects/spanish52
Unzip the compressed file inside you vtiger installation directory.
You have also to edit the config.inc.php to change the default language and timezone:
$default_language = 'es_es'; $default_timezone = 'Europe/Madrid';
11. Basic Theme Customization (Optional)
Basic things to change for a theme customization (Logo and Login screen):
- themes/X/images/vtiger-crm.gif (150×29)
- favicon version>5.1.0: themes/images/vtigercrm_icon.ico
- favicon version<5.1.0: include/images/vtigercrm_icon.ico
- modules/Users/Login.php
- include/images/topBg.gif
- include/style.css
- themes/images/bullets.gif (213×158)
Footer text with vtiger version and license can be change at the bottom of index.php script file in the root of your Vtiger installation directory.
Conclusion
Now that you have Vtiger CRM up and running I suggest you to read Vtiger User Manual on how to use it.
Danilo
References