Category Archives: FreeBSD

Install SuiteCRM on FreeBSD

SuiteCRM 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).

Please visit the SuiteCRM demo on dalescott.net (login as “auditor” with password “guest”).

SuiteCRM was created by forking Sugar CE v6.5. The company SugarCRM provided several editions of its Sugar CRM application, including the open-source Sugar CE (for Community Edition), as well as several proprietary-licensed commercial editions. In 2013, SugarCRM released Sugar v7 to commercial clients but reported it would not be providing the new features in community edition release. SalesAgility, a UK-based CRM consultancy with expertise developing client solutions based on Sugar CE, responded by creating SuiteCRM using the Sugar CE v6.5 codebase. The first release of SuiteCRM was v7.0 in October 2013,  and in 2014 SugarCRM announced that it would not be releasing any further feature releases of Sugar CE. Since then, SuiteCRM has since gone on to become an award winning and world leading CRM application.

Setup

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

  • Download a SuiteCRM zip distribution archive and extract to /usr/local/www/suitecrm-6.5.2.
  • Change owner of the SuiteCRM directory tree to www:www
  • Create a soft link from /usr/local/www/suitecrm to /usr/local/www/suitecrm-7.7.9
  • Configure Apache virtual host suitecrm.dalescott.net
  • Create “suitecrm” database and database user with full permissions to the database. Use these credentials in the install screen.
  • Run installer (http://suitecrm.dalescott.net)

The first thing the installer does is to confirm your acceptance of the AGPL license used by SuiteCRM.

The installer then presents an overview of your system configuration, and identifies any issues preventing installation. In my case, I’m good to proceed.

Next, enter your database credentials and other configuration data.

  • Select install demo data.
  • Enter admin user password and email.
  • Accept default visible modules.
  • Enter SMTP server credentials required for SuiteCRM to send email.

The installer will setup the database and then let you login as the admin user.

The last setup item is to create a cron task used by SuiteCRM to run periodic internal tasks.

TODO show cron job

Login

Login using the admin user and password. After authentication the SuiteCRM dashboard will be displayed.

Summary

SuiteCRM is a mature powerful CRM application. Watch for a basic walkthrough tutorial based the Swift Construction Company’s “using SuiteCRM”, but a large number of on-line video tutorials already exist.

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).

Please visit the X2CRM demo on dalescott.net (login as “auditor” with password “guest”).

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.

Summary

X2CRM appears mature and fully featured, although I must admit I am by no means an expert on CRM systems. I will be spending more time exploring X2CRM features and usability, for stand-alone use and potentially to integrate with webERP. Watch for a basic walkthrough tutorial based the Swift Construction Company’s “using X2CRM”, but a large number of on-line video tutorials already exist.

Patch to FreeBSD Accepted!

It was an emotional moment last week when I had a patch (code change) accepted by the FreeBSD operating system. It was a relatively simple change to the dns/noip port’s post-install message to clarify the port’s configuration and use (a port is the scaffolding code that integrates a third-party application into FreeBSD, and provided as part of FreeBSD).

FreeBSD is a free Unix-like operating system, most commonly found on servers in backrooms and data centers. It is similar to Linux, except that FreeBSD is a direct open source derivative of the original AT&T Research UNIX® (Linux is a re-implementation or clone). FreeBSD is more enterprise friendly than either Microsoft Windows or Linux, because of its permissive license allowing use and rework without cost or legal restrictions (Linux imposes the restrictive copy-left GNU Public License, or GPL, limiting a business’s ability to profit from its own innovations), and because FreeBSD has a well-defined release engineering process that is visible, accessible, and emphasizes stability and trust.

The motivation for the patch came when I was re-building several systems in which the dns/noip port was used – the client for No-IP’s DDNS service. Each time I searched which files had been installed by noip to find the README file with configuration details. The problem would have been avoided entirely if the missing information had only been included in noip‘s post-install message.

I informally discussed my proposed patch with Stanislaw Halik, the dns/noip port maintainer on record, who indicated his approval. I then submitted an official PR (problem report) to the FreeBSD project, and included a patch file giving the specific changes I was proposing.

The PR was reviewed by the FreeBSD maintenance team, Stanislaw gave his official approval, and my provided patch file had been merged into the FreeBSD codebase in less than 24 hours – visible, traceable and trustable!

2016-09-16-noip-pr-212637-dalescottshaw-ca

How cool was that! Although I submitted the patch to scratch my own itch, it was accepted based on its benefit to others.

Dale
Transparency with Trust

P.S. Stanislaw also introduced me to POLA, or the Principle of Least Astonishment. POLA applies to user interface and software design, and can be taken to mean that software should behave in a way that users will anticipate. Since the dns/noip port can now be installed as a binary package (not only compiling from source as has been traditional), users installing the binary package will expect instructions to be meaningful to their situation.

Dynamic DNS on FreeBSD and NoIP.com

no-ip is the only free dynamic IP address provider that provides a client for FreeBSD (or to give credit where it is due, that some kind volunteer ported to FreeBSD).

Regardless, the service works and I have no complaints, other than forgetting how to set it up when I build a new server. So here, for my reference, is how to set up the client on FreeBSD.

  • Create an account on no-ip, then create a domain (either pay to register a domain, or use one of the free ones available).
  • Build and install the client. I have found you can install the binary using pkg, but the only way to create the binary configuration file is with the port, so you might as well compile it yourself anyway.
    cd /usr/ports/dns/noip/ make install
  • Create the client configuration file.
    make conf

You will be prompted for your no-ip username and password, network interface and hostname (say No when asked if you want to update all your hosts, you’ll then be prompted for each of the hostnames you have registered (fwiw, the configu file is /usr/local/etc/no-ip2.conf).

  • Edit /etc/rc.conf to start noip at boot.
    noip_enable=”YES”
  • Start the noip service.
    service start noip service status noip