2024-01-04
PHP
laravel6
347

一、项目部署

1.git 拉取项目
git clone git@gitee.com:xxx/xxx-xxx-php.git

cd /www/web/xxx-xxx-php
cp .env.example .env

mkdir storage
cd storage

mkdir app framework

cd framework
mkdir cache/ sessions/ testing/ views/

cd ../../
chmod -R 777 public/
chmod -R 777 storage/
chmod -R 777 bootstrap/cache/

composer install # 不要带 -vvv 参数,会有各种报错
composer dump-autoload -o # --optimize

# 优化缓存(bootstrap/cache 目录中四个文件)
php artisan optimize
php artisan optimize:clear 

php artisan key:generate --ansi

# 本地 vagrant 开发环境,使用管理员终端 vagrant up 启动虚拟机
php artisan storage:link
标签:

laravel6