以下是在Ubuntu中配置Laravel的步骤:
sudo apt update,sudo apt upgrade。composer create-project --prefer-dist laravel/laravel your_project_name。.env文件中设置数据库连接信息,登录MySQL创建数据库和用户并授权。storage和bootstrap/cache目录设置正确权限sudo chown -R www-data:www-data /var/www/your_project_name,sudo chmod -R 775 /var/www/your_project_name/storage /var/www/your_project_name/bootstrap/cache。php artisan key:generate。php artisan migrate。