Note
You must use Composer to install BLT. Don’t clone the BLT repository unless you are contributing to the BLT project.
Regardless of the operating system you use, you must have the following installed tools available for use from the command line:
Install the most recent versions of dependencies unless otherwise noted.
Building project dependencies requires your local computer to make HTTP and HTTPS requests to several remote software providers. Your local- and network-level security settings must not block requests.
If you must make requests using a proxy server, configure Git to use a proxy, which will address all Git-based requests made by Composer.
Use the following procedures (based on your operating system) to install the necessary dependencies listed above.
To install BLT dependencies on macOS, complete the following steps:
Ensure that you have installed Xcode. Xcode is required to support Homebrew, and you can install Xcode on macOS 10.9 or later by running the following commands:
sudo xcodebuild -license
xcode-select --install
Install the minimum dependencies for BLT. Although you can use the following commands to use Homebrew to install the needed packages, you are not required to use a package manager:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install php git composer
Install the BLT Launcher so that the BLT alias functions properly.
Install Drush only as a dependency of individual projects (instead of installing Drush system-wide). BLT will manage this dependency for you with projects, but for you to run Drush commands independently of BLT commands, install the Drush Launcher.
Set up your LAMP stack for use with your development. See Local development with BLT.
Requirements
BLT on Windows has the following requirements:
Running a 64-bit version of Windows 10 Anniversary update (build 14393 or later).
Access to a local account with administrative rights for BLT’s initial installation.
Windows Subsystem for Linux (installation instructions)
Note
You must create a UNIX username with a password when prompted at the end of the installation process. Certain BLT commands will not function if you install the Windows Subsystem for Linux using an account without a password.
If you cannot use WSL, you can instead set up virtualization, and then run BLT in a virtual machine (VM) or container running Windows, based on the following tools:
Installation
To install the required applications for BLT (including PHP, Node.js, Git, and Composer), run the following commands:
Run the following command, and press Enter when prompted:
sudo add-apt-repository ppa:ondrej/php
Run the following command:
sudo apt-get update
Run the following command:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
Run the following command:
php composer-setup.php
Run the following command:
sudo mv composer.phar /usr/local/bin/composer
Run the following command:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
Run the following command:
sudo apt-get install -y nodejs
Configuring Git
Before working with a BLT project, you must identify yourself to Git by running the following commands:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
If you haven’t already configured an SSH identity (useful for working with projects on GitHub and interacting with your websites on Cloud Platform), you should generate an SSH key.
Linux is fully supported by both BLT, and shares many of the same dependencies as macOS (except for Xcode). Run the commands based on your installed version of Linux to install BLT:
Ubuntu or Debian:
apt-get install git composer drush
Fedora:
sudo dnf install -y git composer drush
# To use NFS with Vagrant, nfs-utils package needs to be
# installed and nfs-server needs to be running.
# https://developer.fedoraproject.org/tools/vagrant/vagrant-nfs.html
sudo dnf install -y nfs-utils && sudo systemctl enable nfs-server
# Enable nfs, rpc-bind and mountd services for firewalld
sudo firewall-cmd --permanent --add-service=nfs \
&& sudo firewall-cmd --permanent --add-service=rpc-bind \
&& sudo firewall-cmd --permanent --add-service=mountd \
&& sudo firewall-cmd --reload
Once the necessary host machine’s prerequisites are installed, BLT can be installed for use on a project through one of the following methods:
If BLT is already set up for your project and you need instructions on how to get started, see Onboarding with BLT. If you are trying to update an existing version of BLT, see Updating BLT.