Skip to content

Commit d2b81f6

Browse files
committed
Merge pull request #590 from alimac/565-composer-global
Clarify local vs. global Composer installation
2 parents c7a2e63 + 199a6b6 commit d2b81f6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

_posts/04-02-01-Composer-and-Packagist.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ There are already a lot of PHP libraries that are compatible with Composer, read
1414

1515
### How to Install Composer
1616

17-
You can install Composer locally (in your current working directory; though this is no longer recommended) or globally
18-
(e.g. /usr/local/bin). Let's assume you want to install Composer locally. From your project's root directory:
17+
You can install Composer locally (in your current working directory) or globally (e.g. /usr/local/bin, recommended).
18+
Let's assume you want to install Composer globally:
1919

2020
{% highlight console %}
21-
curl -s https://getcomposer.org/installer | php
21+
curl -sS https://getcomposer.org/installer | php
22+
mv composer.phar /usr/local/bin/composer
2223
{% endhighlight %}
2324

25+
<strong>Note:</strong> If the above fails due to permissions, run the `mv` line again with `sudo`.
26+
2427
This will download `composer.phar` (a PHP binary archive). You can run this with `php` to manage your project
2528
dependencies.
2629
<strong>Please Note:</strong> If you pipe downloaded code directly into an interpreter, please read the

0 commit comments

Comments
 (0)