網頁

2015年7月31日 星期五

安裝Composer

執行底下指令就可以安裝了
$cd /tmp (先換到tmp目錄)
$curl -sS https://getcomposer.org/installer | php

得到以下訊息
#!/usr/bin/env php
All settings correct for using Composer
Downloading...

Composer successfully installed to: /private/tmp/composer.phar
Use it: php composer.phar

再執行底下指令改成composer,這樣就可以直接執行composer了
$mv composer.phar /usr/local/bin/composer
$composer
回應如下
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.0-dev (bd2d7eba05dc6a51dbbad780b6f0eb505accba75) 2015-07-31 08:06:09
......以下省略

若要更新到最新版:
$ composer self-update

回應如下
Updating to version a67eaf04c7eee3d10d7c64f3eef47995ec150ffe.
    Downloading: 100%         
Use composer self-update --rollback to return to version 523aef76d0fa29c18bf42264e88fc9b58acf825c

參考網址:
Composer官網-Getting Started

沒有留言:

張貼留言