composer安装
1.下载composer
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
php composer-setup.php
php -r "unlink('composer-setup.php');"
2.全局安装
cp composer.phar /usr/local/bin/composer
3.配置中国镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
4.laravel项目初次运行以下脚本
composer install --no-scripts
chown -R www:www ./