Install X2CRM on FreeBSD

X2CRM (also known as X2Engine) is a Customer Relationship Management (CRM) web application, used by a company to store and organize information relating to customers and potential customers in a shared trusted environment. A CRM application may be stand-alone, or may integrate with other enterprise applications, such as an Enterprise Resource Planning (ERP) system (CRM may also be a module within an ERP system).

I became aware of X2CRM after discovering erpBooks “Online Inventory Management” , reportedly forked from webERP and including CRM functionality based on X2Engine (aka X2CRM).

X2CRM was founded by John Roberts, who had previously co-founded SugarCRM. His goal was to develop a superior user interface using a new data model, and to use current web technologies, compared to the first generation of open-source web CRMs. Coincidently, X2CRM was developed using the PHP Yii OO RAD framework, which I had used for my Maestro project.

X2CRM also affirmed John’s faith in an open-source development and business model. X2Engine initially used a “Freemium” business model to support itself, and provided commercial Professional and Platinum versions. However, in April 2016, X2Engine announced it had achieved revenue self-sufficiency as a company, and it was now appropriate to release all premium features of the Platinum version as open-source in the then upcoming v6.0 release (fyi, I will be installing v6.5.2).

Setup

I will be installing X2CRM on FreeBSD 10.3-RELEASE, using Apache 2.4 and MariaDb 10.0.

  • Download a X2CRM zip distribution archive and extract to e.g. /usr/local/www/x2crm-6.5.2.
  • Create a soft link from /usr/local/www/crm to /usr/local/www/x2crm-6.5.2
  • Configure Apache virtual host crm.dalescott.net (the server directory root will be /usr/local/www/crm/x2engine)
  • Run installer (http://crm.dalescott.net/x2engine)

  • Set owner of X2CRM directory tree to www:www
  • Install package pecl-ssh2
  • Install package php56-filter
  • Set session.save_path in /usr/local/etc/php.ini to /tmp
  • Add path to mysql executables to the path used by the Apache daemon.
  • # mkdir -p /usr/local/etc/apache24/envvars.d/
    # echo 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:' > /usr/local/etc/apache24/envvars.d/path.env
    # chmod 755 /usr/local/etc/apache24/envvars.d/path.env
    # service apache24 restart
  • Run installer again. Hurray! Requirements met! 

  • Create “x2engine” database and database user with full permissions to the database. Use these credentials in the install screen.
  • Check “Create sample data”.
  • Enter admin user password and email.
  • Accept default visible modules.
  • Create cron task. I selected “Create a cron task for X2CRM”, after which I was given the opportunity to select when to run the task, or simply hourly. I selected hourly, which resulted in creating a crontab file for user www (/var/cron/tabs/www). 
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/usr/local/www/x2crm-6.5.2/x2engine/.crontab.tmp installed on Sun Mar 26 20:44:57 2017)
# (Cron version -- $FreeBSD: releng/10.3/usr.sbin/cron/crontab/crontab.c 293132 2016-01-04 03:20:41Z pfg $)

#<X2CRM>
@hourly curl http://crm.dalescott.net/index.php/api/x2cron &>/dev/null #@X2CRM@default#@X2CRM@Run delayed or recurring tasks within X2CRM
#</X2CRM>
  • Install!

Login

Login using the admin user and password. I have already logged in as admin and created a new user for myself.

Once authenticated, the X2CRM dashboard is presented. There’s a lot of information, and the bottom of the dashboard is the message feed.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.