GitHub下载或clone最新源码
https://github.com/laravel/laravel/releases
代码根目录执行:
composer install
cp .env.example .env
php artisan key:generate
编辑.env文件的配置(DB):
APP_ENV=local
APP_KEY=base64:H6RIhyLBY-SOME-KEY-HERE-FkzCvGdS8WOU=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=my_dbname
DB_USERNAME=homestead
DB_PASSWORD=secret
添加目录权限:
chmod -R 777 storage/
chmod -R 777 bootstrap/cache/
根据情况执行:
php artisan migrate
php artisan db:seed