温馨提示×

如何在centos中升级dolphin

小樊
40
2025-11-30 00:29:35
栏目: 智能运维

在 CentOS 中升级 Dolphin 的实用步骤

先确认 Dolphin 所指对象

  • 在 CentOS 环境中,Dolphin 通常指 KDE Plasma 的文件管理器;也可能是 Apache DolphinScheduler(分布式工作流调度系统)。两者的升级方式完全不同。若你不确定,可先判断:在终端执行 dolphin -v 若输出版本号,多半是文件管理器;若系统里存在 /opt/dolphinschedulerdolphinscheduler_env.sh 等路径,多半是调度系统。

升级 KDE Dolphin 文件管理器

  • 使用包管理器更新(推荐)
    • 更新系统软件源并升级 Dolphin(或整个 KDE Plasma 组):
      • CentOS 7:sudo yum update -y dolphinsudo yum update -y @kde-plasma-desktop
      • CentOS 8+:sudo dnf update -y dolphinsudo dnf upgrade -y @kde-plasma-desktop
    • 若提示缺少依赖或 KDE 组件,先启用 EPEL 仓库:sudo yum install -y epel-release,然后再执行上面的更新命令。
    • 图形界面方式:打开 KDE 软件中心,搜索 Dolphin,如有更新点击更新。
    • 完成后重启 Dolphin 或系统:dolphin &sudo reboot
  • 从源码编译安装(获取更新特性,适合高级用户)
    • 安装编译依赖:sudo yum groupinstall -y "Development Tools"sudo yum install -y qt5-qtbase-devel qt5-qtdeclarative-devel kdelibs-devel
    • 下载稳定版源码(示例):wget https://download.kde.org/stable/dolphin/5.x/dolphin-5.x.x.tar.xz
    • 编译安装:
      tar -xf dolphin-5.x.x.tar.xz && cd dolphin-5.x.x
      mkdir build && cd build
      cmake ..
      make -j$(nproc)
      sudo make install
      
    • 启动验证:dolphin -v

升级 Apache DolphinScheduler 调度系统

  • 升级前准备
    • 备份 元数据库(如 MySQL/PostgreSQL)、conf/resources/tools/libs/ 等关键目录与文件;确认目标版本与当前版本的 兼容性依赖(JDBC 驱动、ZooKeeper 等)。
  • 执行升级
    • 停止服务(集群/伪集群):sh ./script/stop-all.sh
    • 升级数据库结构:在 ./bin/env/dolphinscheduler_env.sh 中配置数据库,必要时放入对应 JDBC 驱动,执行 sh ./tools/bin/upgrade-schema.sh
    • 升级服务:调整 bin/env/install_config.conf(部署模式相关参数),然后 sh ./bin/start-all.sh
  • 升级后验证与回滚
    • 健康检查:curl http://localhost:12345/dolphinscheduler/actuator/health;查看 logs/api-server.log 是否有异常
    • 功能验证:触发测试工作流,确认调度、任务执行、告警与历史任务迁移正常
    • 回滚方案:用备份恢复 数据库旧版本安装目录/配置,再启动旧版本服务。

常见问题与处理

  • 包冲突或更新失败
    • 检查冲突:yum checkdnf repoquery --conflicts dolphin
    • 处理冲突:sudo yum remove <冲突包>sudo dnf remove <冲突包>
    • 重装 Dolphin:sudo yum reinstall dolphinsudo dnf reinstall dolphin
    • 查看日志:sudo journalctl -xecat /var/log/yum.log
    • 临时替代:安装并使用 NautilusThunar 作为临时文件管理器。
  • 版本仍较旧
    • CentOS 7/8 官方仓库的 KDE 版本通常较保守;如需更新特性,优先考虑从源码编译安装 Dolphin,或在可控范围内使用第三方/内网镜像源(注意稳定性与安全性)。

0