Skip to content

Apt-Get

In Debian and Ubuntu, the apt-get package-manager provides access to an extensive library of software. The script get-buildkit.sh will use apt-get to install all major requirements.

Major features

This process will install the following packages in /usr:

  • Interpreters: PHP-CLI, NodeJS
  • Servers: Apache HTTPD, MySQL, PHP-FPM

Additionally, this process will also install buildkit in $HOME/buildkit.

Trade-offs
  • Pro: Large, well-known repository of packages. Packages are shared and deeply integrated with the host/desktop.
  • Con: Package versions are dictated by the distro. The desktop generally only supports one version of each package. When developing for multiple projects, you may get boxed-in by conflicting dependencies.

Requirements

  • Debian or Ubuntu (see also: Appendix: Compatibility)
  • Sudo privileges
  • (Recommended) Install on a new/clean system.

    Warning: This process is only tested on new/clean systems.

    If you previously used apt-get to install packages for web-hosting/PHP/JS on this system, then this creates some uncertainty. Stay alert for these kinds of complications:

    • Third-Party Sources: Third-party APT repositories could override packages -- changing the versions or file-layouts.
    • Conflicting Services: Services like mariadb-server and mysql-server may substantively conflict (because they have similar port-numbers and similar command-names). In the same way, nginx or caddy may conflict with apache2.
    • Customized Configuration: If you previously installed and modified Apache/PHP/MySQL, the custom configuration could unexpectedly interact with the new configuration.

Download

If you are installing a new Debian/Ubuntu desktop, then you can download everything via get-buildkit.sh. The script will:

  1. Download system requirements (PHP, MySQL, Apache, etc) via apt-get.
  2. Create a working folder ~/buildkit (for helper scripts, caches, site-builds).

You may run get-buildkit.sh as follows:

sudo apt-get install curl
curl -Ls https://civicrm.org/get-buildkit.sh | bash -s -- --full --dir ~/buildkit
Warning: Do not use root, su, or sudo -- except where specifically noted.

Buildkit is generally designed to run as your regular user. If it needs elevated privileges, it will call sudo and ask for privileges.

If one mistakenly runs commands as root, then data-files and cache-files may be created with the wrong permissions and/or wrong locations. This will cause problems later -- and will require finding and fixing the erroneous data.

Warning: If you have "encrypted home directories", then change the --dir.

Ubuntu has optional support for "encrypted home directories". If your system uses this option, then system-services like Apache will have difficulty reading from ~/buildkit. The difficulty may not appear immediately - it would appear after the next reboot.

Instead, put buildkit in a reliable folder like /srv/buildkit. For example:

sudo apt-get install curl
sudo mkdir /srv/buildkit
sudo chown $USER /srv/buildkit
curl -Ls https://civicrm.org/get-buildkit.sh | bash -s -- --full --dir /srv/buildkit

Once the download is complete, you should be able to see the new folder ~/buildkit (or /srv/buildkit).

Next steps

Appendix: Compatibility

The script get-buildkit.sh includes installation steps that have been tested on specific releases of Debian and Ubuntu.

Recently removed versions are shown in this list for information and are marked in the final column.

Versions of Ubuntu and Debian running on Windows Subsystem for Linux (WSL1 and WSL2) are not currently compatible with get-buildkit.sh.

Our current policy is that these specific install steps will be removed from Buildkit when they reach their End Of Life (EoL) date plus 6 months. See this issue for discussion/information.

Debian

Version Codename Release Date EoL Date Buildkit Removal
11 Bullseye September 2021 202x Unknown
10 Buster July 2019 202x Unknown
9 Stretch June 2017 2022 Unknown
8 Jessie April 2015 June 2020 September 2020

Ubuntu

Version Codename Release Date EoL Date Buildkit Removal
20.04 Focal Fossa April 2020 April 2025 October 2025
19.04 Disco Dingo April 2019 January 2020 🔴 June 2020
18.10 Cosmic Cuttlefish October 2018 July 2019 🔴 January 2020
18.04 Bionic Beaver April 2018 April 2023 October 2023
17.10 Artful Aardvark October 2017 July 2018 🔴 January 2019
17.04 Zesty Zapus* April 2017 January 2018 🔴 July 2018
16.10 Yakkety Yak* October 2016 July 2017 🔴 January 2018
16.04 Xenial Xerus April 2016 April 2021 October 2021
14.04 Trusty Tahr April 2014 April 2019 🔴 October 2019
12.04 Precise Pangolin April 2012 April 2017 🔴 October 2017

* = Reuses installation steps for Xenial Xerus.
🔴 = Is currently EoL.
= Has been removed from Buildkit