浏览代码

add installer information

Rob Bast 10 年之前
父节点
当前提交
eb98613672
共有 1 个文件被更改,包括 14 次插入3 次删除
  1. 14 3
      doc/00-intro.md

+ 14 - 3
doc/00-intro.md

@@ -47,6 +47,12 @@ Linux and OSX.
 
 
 ### Downloading the Composer Executable
 ### Downloading the Composer Executable
 
 
+Composer offers a convenient installer that you can execute directly from the
+commandline. Feel free to [download this file](https://getcomposer.org/installer)
+or review it on [GitHub](https://github.com/composer/getcomposer.org/blob/master/web/installer)
+if you wish to know more about the inner workings of the installer. The source
+is plain PHP.
+
 There are in short, two ways to install Composer. Locally as part of your
 There are in short, two ways to install Composer. Locally as part of your
 project, or globally as a system wide executable.
 project, or globally as a system wide executable.
 
 
@@ -93,11 +99,16 @@ Run these commands to globally install `composer` on your system:
 ```sh
 ```sh
 curl -sS https://getcomposer.org/installer | php
 curl -sS https://getcomposer.org/installer | php
 mv composer.phar /usr/local/bin/composer
 mv composer.phar /usr/local/bin/composer
-chmod 755 /usr/local/bin/composer
 ```
 ```
 
 
-> **Note:** If the above fails due to permissions, run the `mv` and `chmod` line
-> again with sudo.
+> **Note:** If the above fails due to permissions, run the `mv` line again 
+> with sudo.
+
+A quick copy-paste version including sudo:
+
+```sh
+curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
+```
 
 
 > **Note:** On some versions of OSX the `/usr` directory does not exist by
 > **Note:** On some versions of OSX the `/usr` directory does not exist by
 > default. If you receive the error "/usr/local/bin/composer: No such file or
 > default. If you receive the error "/usr/local/bin/composer: No such file or