How Tos > General
Set up Composer for a single host
If you want to set up Composer for a single host, follow these steps:
- Open the following URL in your browser: https://getcomposer.org/doc/00-intro.md#downloading-the-composer-executable
- Click the “download this file” link. This will download the “installer” file.
- Open the Terminal app.
- Change to the document root directory of the desired host.
- Enter the following commands (explained here) in the Terminal app. Confirm each line with “Return”.
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
- Composer is now set up.
To install the “psr/log”, a common interface for logging libraries, type the following in your Terminal app and press return.
php composer.phar require psr/log
Your document root should now look like the this:
You can find packages here.