Composer is an essential utility for PHP programmers, and allows you to manage dependencies.
Dependencies
You can use your regular account to install composer, use it, and even update it. You do need to have a few packages installed first though:
|
|
Or on Fedora:
|
|
Local install
Next, fetch the installer and deploy composer to your home directory
|
|
Last, add ~/.local/bin
to your $PATH
:
|
|
You can now run composer:
|
|
Make Composer available for all users
Just run this line if you decide that all users should have access to your copy of Composer:
|
|
If you look up a how to install Composer, you will find a tempting one-liner that uses curl
to fetch a script from the Composer website, then executes it as root
. I don’t think it’s good practice to install software like that, so I would encourage you to just run ‘sudo mv’ at the end.