
Lychee推出了7.9版。更新日志可在GitHub上查看。
具体升级步骤如下
①先SSH连进服务器,然后逐条执行
ssh xservercd /tmpwget -q https://github.com/LycheeOrg/Lychee/releases/latest/download/Lychee.zip -O Lychee_new.zipls -la Lychee_new.zip②下载完成,大概40MB。解压确认版本:
mkdir -p /tmp/Lychee_new_extract
unzip -q /tmp/Lychee_new.zip -d /tmp/Lychee_new_extract
cat /tmp/Lychee_new_extract/Lychee/version.md显示版本为7.9.0
③先备份数据库,然后直接升级
mysqldump -u 【你的ID】_ly -p 【你的ID】_lychee > /home/【你的ID】/【你的域名】/public_html/backup/lychee_db_$(date +%Y%m%d).sql输入密码
如果忘记密码
可以确认一下当前.env里的密码,用显示的密码重新执行
grep DB_PASSWORD /home/【你的ID】/【你的域名】/public_html/photos/.env执行升级程序
/usr/bin/php8.4 /home/【你的ID】/【你的域名】/public_html/photos/artisan down
rsync -av --exclude='.env' --exclude='storage' --exclude='public/uploads' \
/tmp/Lychee_new_extract/Lychee/ \
/home/【你的ID】/【你的域名】/public_html/photos/
/usr/bin/php8.4 /home/【你的ID】/【你的域名】/public_html/photos/artisan migrate --force
/usr/bin/php8.4 /home/【你的ID】/【你的域名】/public_html/photos/artisan config:clear
/usr/bin/php8.4 /home/【你的ID】/【你的域名】/public_html/photos/artisan cache:clear
/usr/bin/php8.4 /home/【你的ID】/【你的域名】/public_html/photos/artisan route:clear
/usr/bin/php8.4 /home/【你的ID】/【你的域名】/public_html/photos/artisan view:clear
/usr/bin/php8.4 /home/【你的ID】/【你的域名】/public_html/photos/artisan up7.9.0升级完成。

如果打开相册显示503,是维护模式还没关闭。artisan up 那条可能没执行完。
回终端执行即可:
/usr/bin/php8.4 /home/【你的ID】/【你的域名】/public_html/photos/artisan up