
Step 2 - Downloading and Installing ComposerĬomposer provides an installer, written in PHP. With the prerequisites installed, we can install Composer itself.

Everything can be installed with the following command: git is used by Composer for downloading project dependencies, and unzip for extracting zipped packages. The php-mbstring package is necessary to provide functions for a library we’ll be using. We’ll need curl in order to download Composer and php-cli for installing and running it. One Ubuntu 18.04 server set up by following the Ubuntu 18.04 initial server setup guide, including a sudo non- root user and a firewall.īefore you download and install Composer, you’ll want to make sure your server has all dependencies installed.įirst, update the package manager cache by running:.To complete this tutorial, you will need:

In this tutorial, you’ll install and get started with Composer on an Ubuntu 18.04 system. It will check which other packages a specific project depends on and install them for you, using the appropriate versions according to the project requirements. IntroductionĬomposer is a popular dependency management tool for PHP, created mainly to facilitate installation and updates for project dependencies. A previous version of this tutorial was written by Brennen Bearnes.
