3.5 KiB
3.5 KiB
2026-07-21
升级脚本支持范围到 Debian 9-13 / Ubuntu 16-26
- 根因:
lib/check_sw.sh的 Debian 依赖 case 只列9|10|11|12,Debian 13 会落入*分支被kill -9退出。 - 改动:
lib/check_sw.sh:151:Debian case 标签9|10|11|12→9|10|11|12|13,Debian 13 复用 12 的依赖列表;包名差异(如 libidn11 在新版移除)由filter_pkglist()按apt-cache policy动态兜底跳过。- 同步更新支持范围声明注释:
check_sw.sh:4、check_os.sh:5、README.md:14、docs/USAGE.md:3与:196,由 "Debian 9+ / Ubuntu 16+" 改为 "Debian 9-13 / Ubuntu 16-26"。
- 验证:
bash -n两文件 OK;Debian 13 现落9|10|11|12|13分支;check_os.sh门槛只查下限(<9/<16)无上限拦截,版本号解析 26.04→26、13→13 正确;sslLibVer对 13/24/26 均ssl102;Ubuntu 走installDepsUbuntu()无 case 拦截。 - 边界(未处理):Ubuntu 24/26 系统
libicu为新版本(74/76+),PHP 7.4 的 intl 扩展可能编译不兼容——属 PHP 模块级适配,本轮仅保证 OS 检测与依赖安装阶段不中途失败,未扩展libicu降级特例(原=~ ^22$仅覆盖 22.04)。 - 仍须同步到服务器:所有改动在本地
E:\workbuddy\ServerStack\,需rsync/git pull后重跑install.sh才生效。
限制 Ubuntu 24+ 只能装 PHP 8.x
- 根因:Ubuntu 24+ 系统
libicu为新版(74/76+),PHP 7.4(及 mphp 7.4)编译不兼容 intl 扩展。 - 判断条件:
Family==ubuntu && Ubuntu_ver>=24(覆盖 24.04 / 25.x / 26.04)。Debian 不限;Ubuntu 22/23 仍允许 7.4。 - 改动(4 文件,
bash -n全 OK):core/menu.sh:交互菜单在 Ubuntu 24+ 把选项 1(php-7.4) 标(unavailable on Ubuntu N+),选 1 时报错并重新选择。core/argument.sh:命令行--php_option 1/--mphp_ver 74在 Ubuntu 24+ 直接exit 1报错。core/validator.sh:校验阶段同样error_exit拒绝 7.4 / mphp 74。core/installer.sh:分发处防御,php_option=1/mphp_ver=74在 Ubuntu 24+ 跳过并提示(防绕过校验)。
- 验证:逻辑模拟各组合正确——Ubuntu 24/25/26 选 7.4 均拒;Ubuntu 22/23、Debian 13 仍允许;空
Family变量有误杀防御(不限制)。 - 仍须同步到服务器才生效。
所有系统防火墙默认选 iptables
- 背景:项目已裁剪为仅 Debian/Ubuntu(firewalld/ufw 已移除),iptables 是唯一的防火墙。原
iptables_flag在交互模式需手动选、命令行模式需传--iptables才置y,否则非交互安装就不装防火墙。 - 改动(2 文件,
bash -n全 OK):core/menu.sh:交互提示默认y([ -z "${iptables_flag}" ] && iptables_flag=y,提示文案加(default y));用户仍可答n退出。core/argument.sh:parse_arguments末尾加iptables_flag=${iptables_flag:-y},非交互安装即使不传--iptables也默认启用;同时Show_Help文案改为 "Enable iptables (enabled by default on all systems)"。- 底层
core/os/init_Ubuntu.sh/init_Debian.sh的if [ "${iptables_flag}" == 'y' ]分支不变,默认开启后所有系统(Debian 9-13 / Ubuntu 16-26)安装时均会装并配置 iptables。
- 验证:模拟四路径——非交互无
--iptables→y、带--iptables→y、交互回车→y、交互答 n→n(退出仍生效)。 - 仍须同步到服务器才生效。