Migrating the Optimizely module to Linux Mint for local development involved three steps:
- installing Drupal 8 beta 3
- installing the module and testing it manually
- running the module's automated test suite
This all went pretty smoothly with minimal work, which is very encouraging as far as transitioning to doing Drupal development in a Linux system.
The one important point I'd like to make in this post is that to chown the entire Drupal instance to www-data:www-data as the owner:group seems to take care of all the owner and permission problems I've had in the past.
The rest of this posting is pretty routine stuff but potentially useful for anyone doing a similar migration.
(1) Installed Drupal 8 beta 3.
Edited /etc/apache2/apache2.conf to insert the following directive, where opti is the site root under the web server root.
Changed the owner of the entire site instance to the user that Apache apparently runs under.
# cd /var/www/html
# chown -R www-data:www-data opti
(2) Installed the Optimizely module.
I copied over the module tree from my old development system. I could have just cloned the repo from Github instead.
# cd /var/www/html/opti/modules/
# mkdir contrib
# cp -r ....../optimizely contrib
And changed the owner of contrib and its subdirectories.
# chown -R www-data:www-data contrib
These steps were sufficient to get the module installed, enabled, and functioning.
(3) Ran the module's automated test suite.
When I tried to enable the Testing core module, I got the error message
The testing framework could not be installed because the PHP cURL library is not available.
# apt-get install php5-curl
This then allowed the Testing module to be enabled.
Successfully ran the entire suite of nine tests. No fails, no exceptions.
“The test run finished in 8 min 42 sec.”
Interestingly, I did not have to increase the php max execution time as was necessary when I ran this suite in a Linux Mint virtual box on a old Windows 7 host.