Prerequisite Before you Install ZurmoCRM on Asustor NAS running ADM 2.1


Before you install ZurmoCRM, please make sure you have meet the LAMP requirements. They will help ZurmoCRM to run faster and more responsive on your ADM.

Launch and Create MySQL Database

You need to enable MySQL server in Services→MySQL Server→Enable MySQL Server. The default password for root is admin. Next to use SSH login to ADM as root and execute following command to create a MySQL database with COLLATE = utf8_unicode. It is okay to use a different database name to replace zurmo. You may learn more about the SQL syntax in MySQL 5.5 Reference Manual.

mysql -u root --password=admin -e "CREATE DATABASE zurmo COLLATE = utf8_unicode_ci"

For those not familiar with Linux commands, install phpMyAdmin from App Central and login with the same account as MySQL in your browser. Choose Database tab to create a database.

Enable and Increase Default APC

Open Services→Web Server and click on Web Server tab. Make sure Enable PHP cache is tick and the Size is set to 128M. It will increase apc.shm_size in apc.ini to 128M.

APC Setting in Web Server on ADM.
APC Setting in Web Server on ADM.

If it is less than 128M, you might see a page display error message “include(): Unable to allocate memory for pool.” while saving any records. According to a Twitter by Dan O’Brien ‏@ abend0c4 18 Oct 2012, it is related apc.shm_size.

It happens when apc.shm_size is smaller than 96MB.
It happens when apc.shm_size is less than 96MB.

More information about APC configuration may be found in The Perfect APC Configuration by Greg Rickaby.

Increase max_execution_time on Slow Machine

ZurmoCRM needs about 12 minutes to install demo data on Atom. Therefore, please increase max_execution_time to 2000 /raid/module/apache/sys/etc/php.ini before first-time configuration because it takes longer than default to install demo data.

Load memcached

Make sure memcached is running before first-time-configuration. The LAMP in ADM 2.1 comes with Memcache which is an interface for PHP to communicate with memcached. But ADM doesn’t provide any graphical tools nor load memcached during boot time, you need to load it manually.

memcached -u admin -l 127.0.0.1 -P 11211 -m 128 -d

If you need a script to load it automatically during boot time, [HOW TO] Run your own script on system startup on Asustor Community Forum provides a very detail explain. Just create a shell script containing above command with the right naming convention, eg. S90memcached.sh, and put it in /usr/local/etc/init.d/.

Security

It would be a good idea to create another MySQL account for ZurmoCRM to access its own database. Using the same root account is convenient but risky. Synology Security Issue and How-to Harden your NAS explains how to enable security settings in ADM to increase protection.

FAQ

Where can I download the latest package?

You may download from my dropbox link.

It would be nice of you if you use my referral link to register a Dropbox account. Both of us will get extra 500MB of bonus space.

Why I only see a blank page?

Your browser fails to load the page. Please clear your browser cookie or restart Apache with following command.

/volume0/usr/builtin/etc/init.d/S54apache2 restart

In some case, it is due to privilege issue. You need to use chown to change the owner of zurmo folder to the same user runs Apache.

Why it fail to save and display “include(): Unable to allocate memory for pool.”?

It is an APC issue. Please increase apc.shm_size to greater than 96MB. Refer to Enable and Increase Default APC section of this post for detail explain.

Why I see “Error code: 111 Message(Memcached): Connection refused” when I push [Install] button during configuration?

Because  memcached is not loaded. Refer to Load memcached section of this post for detail explain.

More Information

I list some useful resource here to help you fine tune your LAMP on ADM.

  1. phpinfo() Reports on NAS
  2. Asustor ADM Configuration and Executable Files
  3. Optimize Asustor ADM for ZurmoCRM

If you need a reference about performance, following post might be useful.

  1. Asustor AS-602T as a ZurmoCRM Application Server Performance Report

The last is about the session and multi-core processor in LAMP. It helps you to know why only one core is serving you when login to ZurmoCRM.

  1. How Multi-Core Processors Accelerate your LAMP Applications

Reference

  1. Apache
  2. AskUbuntu: How to run mysql command from terminal?
  3. Asustor ADM
  4. Asustor ADM Configuration and Executable Files
  5. Asustor AS-602T as a ZurmoCRM Application Server Performance Report
  6. Asustor Community Forum: [HOW TO] Run your own script on system startup
  7. Greg Rickaby: The Perfect APC Configuration
  8. How Multi-Core Processors Accelerate your LAMP Applications
  9. I-ON-RAILS: Creating a MySQL Database from Terminal or Command Line
  10. memcached
  11. MySQL
  12. MySQL: MySQL 5.5 Reference Manual :: 13 SQL Statement Syntax :: 13.1 Data Definition Statements :: 13.1.10 CREATE DATABASE Syntax
  13. Optimize Asustor ADM for ZurmoCRM
  14. phpMyAdmin
  15. PHP: PHP Manual: Function Reference: Affecting PHP’s Behavior: APC: Installing/Configuring: Runtime Configuration
  16. PHP: PHP Manual: Function Reference: Affecting PHP’s Behavior: APC: Installing/Configuring: Runtime Configuration: apc.shm_size
  17. phpinfo() Reports on NAS
  18. Synology Security Issue and How-to Harden your NAS
  19. Twitter by Dan O’Brien ‏@ abend0c4 18 Oct 2012
  20. Wiki: LAMP (software bundle)
  21. Wiki: Multi-core processor
  22. Wiki: Session (computer science)
  23. ZurmoCRM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s