Jungle Ran

Blog/Bloglet about Drupal, Ops, and mORe

Customize Acquia Dev Desktop

Submitted by jungle on Sun, 02/09/2020 - 02:32

Why Acquica Dev Desktop 2?

So if we could get Acquica Dev Desktop working as what we expected, it would be a good alternative for Drupal devs who use macOS.

Clean up

Remove export PATH="$PATH:/Applications/DevDesktop/tools" from ~/.profile to avoid conflicts, meanwhile, add aliases to ~/.profile for easy switching PHP environment

  1. alias p71="export PHP_ID=php7_1; export PATH=/Applications/DevDesktop/php7_1_x64/bin:/Applications/DevDesktop/mysql/bin:/Applications/DevDesktop/drush_9:$PATH"
  2. alias p72="export PHP_ID=php7_2; export PATH=/Applications/DevDesktop/php7_2_x64/bin:/Applications/DevDesktop/mysql/bin:/Applications/DevDesktop/drush_9:$PATH"
  3. alias p73="export PHP_ID=php7_3; export PATH=/Applications/DevDesktop/php7_3_x64/bin:/Applications/DevDesktop/mysql/bin:/Applications/DevDesktop/drush_9:$PATH"

Install extensions

Tools required:

  1. # required to build extensions
  2. $ brew install autoconf pkg-config

Pecl extenisons

Just follow up Add a PHP extension to Acquia Dev Desktop

Non-Pecl extensions/built-in extensions

No resource on the Internet as I know so far (Feb 8, 2020) introducing how to install non-pecl extension and built-in extensions for Acquia Dev Desktop

imap
  1. $ brew install krb5 openssl@1.1 imap-uw
  2. ### Active php 7.3
  3. $ p73
  4. ### Download
  5. $ wget https://www.php.net/distributions/php-7.3.39.tar.gz && tar xzf php-7.3.39.tar.gz
  6. $ cd php-7.3.39/ext/imap
  7. $ phpize
  8. $ ./configure --with-kerberos=/usr/local/opt/krb5 --with-imap-ssl=/usr/local/opt/openssl\@1.1 --with-imap=/usr/local/opt/imap-uw
  9. $ make
  10. $ make install
ldap
  1. $ brew install openldap
  2. ### Active php 7.3
  3. $ p73
  4. ### Download
  5. $ wget https://www.php.net/distributions/php-7.3.39.tar.gz && tar xzf php-7.3.39.tar.gz
  6. $ cd php-7.3.39/ext/ldap
  7. $ phpize
  8. $./configure --with-ldap=/usr/local/opt/openldap
  9. $ make
  10. $ make install

Extras

Append two lines to settings.php

  1. $databases['default']['default']['charset'] = 'utf8mb4';
  2. $databases['default']['default']['collation'] = 'utf8mb4_general_ci';

Where are the database setttings:

  1. # On macOS
  2. $ open ${HOME}/.acquia/DevDesktop/DrupalSettings

Remove all tools under following folders, besides drush and reinstall by running composer install, especially having phpcs configured already.

  • /Applications/DevDesktop/drush_9/drush
  • /Applications/DevDesktop/tools

Change drush version

  1. $ cd /Applications/DevDesktop/tools
  2. # edit composer.json, change the version
  3. $ composer install -vvv

References

©2020 ranqiangjun.com. All rights reserved.