1.安装composer
php -r "copy(‘https://install.phpcomposer.com/installer‘, ‘composer-setup.php‘);"
php composer-setup.php
php -r "unlink(‘composer-setup.php‘);
2.将composer变成全局可用
sudo mv composer.phar /usr/local/bin/composer
3.使用composer安装laravel
composer create-project laravel/laravel laravel54 "5.4.*"
4.将根目录配置到 laravel54/public 下即可
原文:https://www.cnblogs.com/zonehoo/p/9251565.html