______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/ / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ / \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/ Composer version 1.0-dev (8d6ab70ae590e84cc94871a3ee08be2b09979520) 2015-02-01 14:00:06 Usage: [options] command [arguments] Options: --help (-h) Display this help message. --quiet (-q) Do not output any message. --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. --version (-V) Display this application version. --ansi Force ANSI output. --no-ansi Disable ANSI output. --no-interaction (-n) Do not ask any interactive question. --profile Display timing and memory usage information --working-dir (-d) If specified, use the given directory as working directory. Available commands: about Short information about Composer archive Create an archiveof this composer package browse Opens the package's repository URL or homepage in your browser. clear-cache Clears composer's internal packagecache. clearcache Clears composer's internal package cache. config Set config options create-project Create new project from a package into given directory. depends Shows which packages depend on the given package diagnose Diagnoses the system to identify common errors. dump-autoload Dumps the autoloader dumpautoload Dumps the autoloader global Allows running commands in the global composer dir ($COMPOSER_HOME). help Displays help for a command home Opens the package's repository URLor homepage in your browser. info Show information about packages init Creates a basic composer.jsonfileincurrentdirectory. install Installs the project dependencies from the composer.lockfileifpresent, or falls back on the composer.json. licenses Show information about licenses of dependencies list Lists commands remove Removes a packagefrom the require or require-dev require Adds required packages to your composer.jsonand installs them run-script Run the scripts defined in composer.json. searchSearchfor packages self-update Updates composer.phar to the latest version. selfupdate Updates composer.phar to the latest version. showShow information about packages statusShow a listof locally modified packages update Updates your dependencies to the latest version according to composer.json, and updates the composer.lockfile. validate Validates a composer.json
觀看版本
可以執行
1
$ composer --version
或是執行
1
$ composer -V
可以看到
1
Composer version 1.0-dev (8d6ab70ae590e84cc94871a3ee08be2b09979520) 2015-02-0114:00:06
更新版本
未來要更新版本,
只要執行
1
$ composer self-update
或是執行
1
$ composer selfupdate
若已經是最新的版本,就會看到類似下面的訊息
1
You are already using composer version 8d6ab70ae590e84cc94871a3ee08be2b09979520.
說明為什麼可以安裝在「~/bin」
觀看「~/.profile」。
1
$ cat ~/.profile
一般的狀況下,Ubuntu的「~/.profile」如下。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022 # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f"$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi # set PATH so it includes user's private bin if it exists if [ -d"$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi