Install



Terminus is available for Mac OS X, Linux, and Windows 7 and 10.

Requirements

  • PHP Version 5.5.9 or later (must include the php-xml extension). You can check your PHP version by running php -v from a terminal application.
  • PHP-CLI
  • PHP-CURL
  • Composer
  • Windows Only: Terminus requires a *nix-like environment. If you don't already have a bash emulator, we recommend Git for Windows.

    If you already have it configured and are regularly using it, we have seen some users find success with Bash on Ubuntu on Windows (Windows 10 only).

Install

Install the most recent release of Terminus with the following command within a directory where you have permission to write files. If in doubt, you can create a terminus directory in your $HOME and install there:

curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar install

Authenticate

Once Terminus is installed, login with a machine token, which is used to securely authenticate your machine. Machine tokens provide the same access as your username and password, and do not expire. For more information, see Machine Tokens.

First, create a Machine Token from User Dashboard > Account > Machine Tokens.

Once the token has been created, use it to authenticate Terminus by running the following command:

terminus auth:login --machine-token=‹machine-token›

After a token has been used, future sessions can be established by email:

terminus auth:login --email=dev@example.com

Troubleshooting

Permission Denied

If the installer throws an IOException at the end:

  [Symfony\Component\Filesystem\Exception\IOException]
  Failed to create symbolic link from "/path/to/current/dir/vendor/bin/terminus" to "/usr/local/bin/terminus".

You may need to remove an old installation from terminus from /usr/local/bin/terminus.

If you run into permission problems such as:

file installer.phar: Permission denied
  0 3150k    0  1928    0     0   1474      0  0:36:28  0:00:01  0:36:27  7330
curl: (23) Failed writing body (0 != 1928)

You should relocate your installation to a directory where you have permission to write files. If in doubt, you can create a terminus diretory in your $HOME and go there:

mkdir $HOME/terminus
  cd $HOME/terminus
  curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar install

PHP Fatal error: Uncaught exception 'ReflectionException'

The php-xml extension is typically included and enabled by default when installing PHP. However, the following error indicates that the php-xml extension is missing:

PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class DOMDocument does not exist' in /root/vendor/consolidation/output-formatters/src/Transformations/DomToArraySimplifier.php:24

To resolve this error, install the php-xml extension.

curl: (60) SSL certificate problem

The following error occurs when curl is unable to verify the local issuer certificate:

curl: (60) SSL certificate problem: unable to get local issuer certificate

To resolve, save a copy of the latest CA certificate to a new file named cacert.pem then add curl.cainfo = "[path_to_file]\cacert.pem" to your php.ini file. If you're running XAMPP, you can add the cacert.pem file within the xampp\php\extras\ssl directory.

Windows 10 Installation issues

Problem: PHP is not installed.

Solution: Install PHP. Consider using a package such as XAMMP, which provides a simple installation process.


Problem: Composer is not installed.

Solution: Install composer using the .exe installer


Problem: curl: command not found

Installation fails because curl cannot be found:

User1@DESKTOP-UBJ92JO  /usr/bin
$ curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar install
bash: curl: command not found

Solution: Install curl


Problem: The Terminus install was successful, but the path was not set.

Terminus was installed, but the installer was not able to write to your bin dir.

Solution: To enable the terminus command, add this alias to your .bash_profile file:

alias terminus=terminus=/c/Users/User1/vendor/bin/terminus

Or you can enable it by adding the directory the executable file is in to your path:

PATH="C:\Users\User1\vendor\bin:$PATH"