Installing vTiger on Ubuntu v10.04 from source

UPDATE: 2011/10/14: I’ve been stepping through this HOWTO with a colleague who is attempting to setup vtiger and ran into a few issues.  As we’ve found issues, I’ve updated this post.  FYI, he’s been following the instructions in this post with Ubuntu 11.04.

SugarCRM version 6 was released early this month, and it looks pretty nice.  The problem is that the new user interface is reserved for the Professional and Enterprise Editions of SugarCRM.  This seems to be part of a trend with many open source projects: give the community a taste of the product but the really good features are to be reserved for the versions that you pay for.  I understand why an open source company would decide to go down this route and it’s not a bad business model really.  But, when you charge $360/year/user, that’s when I begin to lose interest.  So for a Sales company of 50 Sales reps to use the Professional Edition of SugarCRM, they would need to shell out $18,000 per year.  That’s pre-hardware cost.  I have nothing against SugarCRM (actually I like it as a product).  However, the cost is just too high to justify when comparable alternatives exist.

After SugarCRM, the next open source CRM that everyone talks about is vTiger.  vTiger actually advertises with the tag line of “Tired of kinda, sorta Open Source?”.  After all of the positive recommendations, I decided that it’s time to give it a serious try.  In the past, everytime I’ve tried getting vTiger to work using the precompiled .bin file, it didn’t work right for me.  So I decided to take a crack at it from source, which turned out to be pretty easy.  Below is a step-by-step howto for install vTiger on Ubuntu v10.04 from source.  NOTE: This is simply a tutorial for getting vTiger CRM up and running.  Make sure to read vTiger’s User Documentation on how to properly set the permissions to the files to appropriately lock it down prior to deployment

1.) Download the vTiger source

wget http://sourceforge.net/projects/vtigercrm/files/vtiger%20CRM%205.2.0%20VB2/vtigercrm-5.2.0-vb2.tar.gz/download

2.) Install all the required libraries, MySQL, and PHP via APT

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

3.) Configure Apache: /etc/apache2/sites-available/default (this is just a basic Apache, you can customize for your own purposes)

<VirtualHost *:80>
ServerName tiger.mydomain.com
DocumentRoot /var/www

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
ServerSignature Off

</VirtualHost>

4.) Give the access to these files: sudo chmod -R a+rw

sudo chmod -R a+rw config.inc.php
sudo chmod -R a+rw tabdata.php
sudo chmod -R a+rw install.php
sudo chmod -R a+rw parent_tabdata.php
sudo chmod -R a+rw cache
sudo chmod -R a+rw cache/images/
sudo chmod -R a+rw cache/import/
sudo chmod -R a+rw storage/
sudo chmod -R a+rw install/
sudo chmod -R a+rw user_privileges/
sudo chmod -R a+rw Smarty/cache/
sudo chmod -R a+rw Smarty/templates_c/
sudo chmod -R a+rw modules/Emails/templates/
sudo chmod -R a+rw modules/
sudo chmod -R a+rw cron/modules/
sudo chmod -R a+rw test/vtlib/
sudo chmod -R a+rw backup/
sudo chmod -R a+rw Smarty/templates/modules/
sudo chmod -R a+rw test/wordtemplatedownload/
sudo chmod -R a+rw test/product/
sudo chmod -R a+rw test/user/
sudo chmod -R a+rw test/contact/
sudo chmod -R a+rw test/logo/
sudo chmod -R a+rw logs/
sudo chmod -R a+rw modules/Webmails/tmp/

5.) Open a browser and go to the vTiger URL: http://vtiger.mydomain.com

Start the Installation process by going to the new vtiger URL that you created.

6.) Update /etc/php5/apache2/php.ini (make appropriate modifications, restart apache, check again)

When you open the a browser and begin the install process, it will tell you the recommended settings for PHP (this forum post has many of the changes that need to be made).  After modifying the php.ini file, restart apache and click “Check again”.  Everything should show up as ready.

If preinstall items still show up as missing, restart apache.  If the database will be on the same machine as vTiger, you can set the database host as localhost and maker sure to create a new db user:

# mysql -u root -p
mysql> CREATE DATABASE vtiger_db DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
mysql> GRANT ALL ON vtiger_db.* TO ‘vtigeruser’@’localhost’ IDENTIFIED BY ‘SET_PASSWORD_HERE’;

Installing the Customer Portal Plugin to vTiger

So, after trying out vTiger for a bit, I wanted to test drive the customer portal plugin.  This looked like a very simple install according to the vTiger Customer Portal User Guide, and it would have been had I disabled Deprecated warnings from PHP.  It’s 3 simple steps:

From the Wiki:

UPDATE: 2011/10/13: Replace 4.2 to 5.2.0.  You will probably have problems trying to get the Customer Portal 4.2.x working with vTigerCRM 5.2.x.

1. Download the vtiger_Customer_Portal_4_2.zip vtigercrm-customerportal-5.2.0.zip from the http://prdownloads.sourceforge.net/vtigercrm/vtiger_Customer_Portal_4_2.zip?download http://sourceforge.net/projects/vtigercrm/files/vtiger%20CRM%205.2.0/Add-ons/

2.Extract the vtiger_Customer_Portal_4_2.zip vtigercrm-customerportal-5.2.0.zip file to an appropriate location in your Web site. After extracting the file structure will be <Web Site>/vtigerCRM/customerportal/<Portal related Files>. You can also modify the directory structure as per your Web site file conventions.

3. Modify the PortalConfig.php file present under vtigerCRM/customerportal/ as given below:

Server_Path: Specify the absolute path (URL) of the vtiger CRM server. For example, if your vtiger CRM server is running at http://vtigercrm.com/demo means you need to specify the Server_Path as given below:

$Server_Path = "http://vtigercrm.com/demo";

Authenticate_Path: Specify the absolute path (URL) of the vtiger Customer Portal directory in your Web site. For example, if you have extracted the vtiger Customer Portal related files in to your Web site at http://vtiger.com/demo/portal means you need to specify the value for Authenticate_Path parameter as given below:

$Authenticate_Path = "http://vtiger.com/demo/portal";

Now save the PortalConfig.php file.

Now, at this point, everything should be ready.  I created a test customer portal account without any issue, but when attempting to login, I received this error: “Could not connect to server. Please contact the administrator.”  After spending some time on the forums and trying out different things (here and here, and various others), I started looking directly at the code.  Specifically, /customerportal/CustomerAuthenticate.php, which has a nice little block of code commented out with the following comment above the code block: 

//Uncomment the following lines to get the error message in login screen itself.

Excellent.  I uncomment the block and see this error: XML error parsing SOAP payload on line 2: Not well-formed (invalid token).  After some more forum searching, I finally just opened the URL in a browser and found that the error was being thrown because Apache was returning Deprecated warning messages for some of the functions in the PHP libraries.  Then it was just a matter of updating /etc/php5/apache2/php.ini:

error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

Restart Apache and everything should be all set!  NOTE:  If you were following along exactly, make sure to re-comment out that block of code in /customerportal/CustomerAuthenticate.php that returned the error.

UPDATE: 2011/10/14: You will also need to set display_errors = Off, as the display of those errors may interfere with the communication between the customer portal code and the vtigercrm SOAP API.  Keep log_errors = On to follow the errors in the Apache log.

I still haven’t decided if I am settling with vTiger or if I will be going with something else.  However, I went through the trouble of getting it up and running on Ubuntu and didn’t see any good tutorials on how to do this (except one good forum post), so I thought I’d share the howto.  I hope this helps!

References:

Slashdot: SugarCRM 6 Released, But Is It Open Source?
vTiger 510 Installation on Linux
vTiger Installation on Ubuntu v9.04
vTiger CRM Installation Manual
How to disable PHP 5.3 Deprecated errors

13 thoughts on “Installing vTiger on Ubuntu v10.04 from source

  1. I just downloaded VTiger 5.2.0, and want to install it on my Ubuntu 10.04

    Does it work with PHP 5.3?
    Mine is 5.3.2,
    on the site it is told that it sould be “PHP 5.0.x through 5.2.x”

    Like

    1. I am able to run vTiger on Ubuntu 10.04 using the PHP package that I installed from apt, which is 5.3.2: http://packages.ubuntu.com/lucid/php5

      I have had no problems with vTiger on Ubuntu using a newer version of PHP.

      Like

  2. Hi Chris,

    Can you explain in what step (& how) we add the apache server and how the file vtigercrm-5.2.0-vb2.tar.gz is place inside the apache structure to then config via localhost? Thank you

    Like

    1. Mile, sure. First off, I would not recommend using the Validation Build of vtigercrm any more. The Final release of 5.2.0 came out a while back, and there is actually a newer release (5.2.1) that you can download directly from vtiger.com.

      The Apache config is on step 3. You will extract the tar.gz file to /var/www (you can actually put the files wherever you want, but the default for directory for Apache files in Ubuntu is /var/www). Then, you configure a virtual host in Apache: edit /etc/apache2/sites-available/default:

      ServerName tiger.mydomain.com
      DocumentRoot /var/www

      # Possible values include: debug, info, notice, warn, error, crit,
      # alert, emerg.
      LogLevel warn
      ErrorLog /var/log/apache2/error.log
      CustomLog /var/log/apache2/access.log combined
      ServerSignature Off

      After that, restart Apache: sudo /etc/init.d/apache2 restart
      Open a web browser, navigate to your server and you should see the vTiger Installation screen.

      Like

  3. Hey Chris,

    Did my best to follow your guide, including the linked forum post. The only difference is I am running ubuntu 10.10. Everything *appears* to go correctly, but when I try to browse to http://vtigermachine/index.php or install.php, I just get a blank page back. No errors in apache error.log. Any thoughts?

    Like

    1. Chris,
      It’s likely that you are missing a package and you don’t have PHP errors turned on to see what the problem is.
      Edit /etc/php5/apache2/php.ini
      Update these 2 lines:
      error_reporting = E_ALL & ~E_DEPRECATED
      display_errors = On

      Then restart apache:
      /etc/init.d/apache2 restart

      Refresh your browser and you should see the errors.

      NOTE: It’s probably not a good idea to keep the display_errors option on if you decide to run vTiger in a production environment. So after you resolve the errors, it’s probably best to turn off display_errors again.

      I hope this helps.

      Like

  4. I have installed ubuntu server 10.10 but am getting stuck
    on during the installation, but it is installed… makes no sence
    Database UTF-8 Support Not Enabled More Information any help would
    be greate i have spent sometime on trying to get this to work, i
    can get the windows xampp version to work but not native linux
    could someone please help me

    Like

    1. @Calvin,
      A quick google search resulted in some good suggestions. This particular post on the Vtiger forums might help: http://forums.vtiger.com/viewtopic.php?t=40012

      Like

  5. Thnx for this howto, running ubuntu 10.10 x86_64 php
    5.3.3

    Like

  6. I followed your directions but my Customer Portal doesn’t even show up. it doesn’t even display anything for me to login into. I could use some help.

    Like

  7. Nevermind. I keep forgeting that your directions are for an older version. However, it was so superbly helpful for me. THanks.

    Like

  8. Thanks! You save my day 😀

    Like

Leave a comment