How To Install PHP Composer on Ubuntu 18.04 & 16.04
The PHP Composer is a package management tool for PHP similar to NPM for Nodejs and bundle for Ruby. Using composer tool we can define required libraries for our project and install with the composer in the single command. We don’t need to search for each library to install.
This tutorial helps you to install and configure PHP composer on Ubuntu 16.04, 14.04 systems.
1. Prerequsities
- Shell access to a running Ubuntu system with sudo privilege.
- PHP must be installed and configured, version 5.3 or higher.
2. Install Composer on Ubuntu
To install PHP composer on an Ubuntu system. We just need to download composer executable and put under bin directory.
Now use the following commands to make composer available globally for all users in your system, which can be used for all PHP applications on that system.
After installation of the composer on your system. Type composer at the command prompt. This will provide you composer version details along with options available with composer command.
Output:
3. Upgrade PHP Composer on Ubuntu
You can download the latest version of the composer by executing same commands used for installation. The composer also has capabilities to update itself. Use the following command to update composer itself.
Nhận xét
Đăng nhận xét