Next, we’ll verify that the downloaded installer matches the SHA-384 hash for the latest installer found on the Composer Public Keys / Signatures page. Make sure you’re in your home directory, then retrieve the installer using curl: We’ll download it, verify that it’s not corrupted, and then use it to install Composer. Step 2 - Downloading and Installing ComposerĬomposer provides an installer script written in PHP. Once the prerequisites are installed, you can proceed to installing Composer. You will be prompted to confirm installation by typing Y and then ENTER. Next, run the following command to install the required packages: We’ll install these dependencies now.įirst, update the package manager cache by running: In addition to dependencies that should be already included within your Ubuntu 20.04 system, such as git and curl, Composer requires php-cli in order to execute PHP scripts in the command line, and unzip to extract zipped archives. Step 1 - Installing PHP and Additional Dependencies To set this up, you can follow our initial server setup guide for Ubuntu 20.04. In order to follow this guide, you will need access to an Ubuntu 20.04 server as a non-root sudo user, and a firewall enabled on your server. In this tutorial, you’ll install and get started with Composer on an Ubuntu 20.04 system. Composer is also commonly used to bootstrap new projects based on popular PHP frameworks, such as Symfony and Laravel. 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. Composer is a popular dependency management tool for PHP, created mainly to facilitate installation and updates for project dependencies.
0 Comments
Leave a Reply. |