首先安装composer,
> `curl -sS https://getcomposer.org/installer | php`
`mv composer.phar /usr/local/bin/composer`
composer安装laravel指定版本命令:
`composer create-project –prefer-dist laravel/laravel test`
默认安装最新版本,如想安装指定版本,在其后追加指定的版本号即可,
例如安装laravel5.6版本,
`composer create-project –prefer-dist laravel/laravel blog 5.6.*`