TT Bigdata TT Bigdata
首页
GitHub (opens new window)
JaneTTR

JaneTTR

数据酿造智慧,每一滴都是沉淀!
  • Ambari 深度专题

  • Bigtop 方法论

  • 自定义集成

  • Ambari Server 与 Web

  • Ambari Metrics

  • Ambari Plus 思考

  • Redis集成实战

    • Bigtop通用部分

    • Bigtop打包部分

      • RPM

      • DEB

        • Step4-buildroot处理
        • Step5-Debian下构造-source
        • Step5-Debian下构造-compat
        • Step5-Debian下构造-control
        • Step5-Debian下构造-copyright
        • Step5-Debian下构造-dirs
        • Step5-Debian下构造-install
        • Step5-Debian下构造-inst|rm
        • Step5-Debian下构造-rules
        • Step6-Log-编译细节
        • Step7-Log-安装细节
          • 一、Ubuntu 安装日志概览
          • 二、参数对照表
          • 三、关键安装动作
          • 四、Debian 工具链接管
          • 五、最终产物
        • Step8-Log-制品细节
    • Ambari部分

  • 通用代码模板

  • 各组件代码

  • 技术专题
  • Redis集成实战
  • Bigtop打包部分
  • DEB
JaneTTR
2025-08-18
目录
一、Ubuntu 安装日志概览
二、参数对照表
三、关键安装动作
四、Debian 工具链接管
五、最终产物

Step7-Log-安装细节

# 一、Ubuntu 安装日志概览

在 Ubuntu 22.04 环境下,Bigtop 的安装阶段依旧由 install_redis.sh 驱动,但与 RedHat 系列相比,最终制品为 deb 包 而非 rpm。以下是修剪后的关键日志片段:

image-20250818140734667

02:29:13.066 [QUIET] [system.out] env REDIS_VERSION=7.4.0 \
       bash debian/install_redis.sh \
               --bin-dir=/usr/bigtop/3.2.0/usr/bin \
               --build-dir=/opt/modules/bigtop/output/redis/redis-3-2-0-7.4.0 \
               --etc-dir=/usr/bigtop/3.2.0/etc/redis \
               --tar-name=redis-7.4.0 \
               --var-dir=/usr/bigtop/3.2.0/var/lib/redis \
               --doc-dir=/usr/bigtop/3.2.0/usr/share/doc/redis-7.4.0 \
               --man-dir=/usr/bigtop/3.2.0/usr/share/man \
               --prefix=/opt/modules/bigtop/output/redis/redis-3-2-0-7.4.0/debian/tmp \
               --lib-dir=/usr/bigtop/3.2.0/usr/lib/redis
1
2
3
4
5
6
7
8
9
10
11

警告

注意这里的 --prefix 指向 debian/tmp,这是 Debian 系列打包时 buildroot 的根目录,和 RedHat 的 BUILDROOT 不太一样。

# 二、参数对照表

参数名 说明 Ubuntu 示例路径
--bin-dir 可执行文件路径 /usr/bigtop/3.2.0/usr/bin
--build-dir 源码构建目录 /opt/modules/bigtop/output/redis/redis-3-2-0-7.4.0
--etc-dir 配置目录 /usr/bigtop/3.2.0/etc/redis
--var-dir 数据目录 /usr/bigtop/3.2.0/var/lib/redis
--doc-dir 文档目录 /usr/bigtop/3.2.0/usr/share/doc/redis-7.4.0
--man-dir man 手册目录 /usr/bigtop/3.2.0/usr/share/man
--lib-dir 库文件目录 /usr/bigtop/3.2.0/usr/lib/redis
--tar-name 源码包名称 redis-7.4.0
--prefix buildroot 根目录 /opt/modules/bigtop/output/redis/redis-3-2-0-7.4.0/debian/tmp

# 三、关键安装动作

Ubuntu 下安装阶段主要分为三类动作:

  1. 目录初始化 通过 install -d 创建 log、etc、lib、bin 等目录。

  2. 文件搬运与配置调整 利用 rsync、mv 将源码产物复制到 buildroot 内的对应目录,并将 redis.conf、sentinel.conf 移动到 conf.empty/。

  3. 符号链接处理 将 /etc/redis/redis.conf 与 /etc/redis/sentinel.conf 链接回 lib 目录,保证和系统统一路径兼容。

# 四、Debian 工具链接管

和 rpm %install 不同,Debian 打包阶段交由 debhelper (dh_*) 工具链接管:

02:29:13.859 [QUIET] [system.out]    dh_install
02:29:14.357 [QUIET] [system.out]    dh_installdocs
02:29:14.407 [QUIET] [system.out]    dh_installchangelogs
02:29:14.566 [QUIET] [system.out]    dh_link
02:29:14.672 [QUIET] [system.out]    dh_compress
02:29:14.784 [QUIET] [system.out]    dh_fixperms
02:29:14.821 [QUIET] [system.out]    dh_missing
02:29:19.517 [QUIET] [system.out]    dh_makeshlibs
02:29:19.703 [QUIET] [system.out]    dh_installdeb
02:29:19.743 [QUIET] [system.out]    dh_gencontrol
02:29:20.255 [QUIET] [system.out]    dh_builddeb
1
2
3
4
5
6
7
8
9
10
11

image-20250818144157319

笔记

这里可见大量 warning: Compatibility levels before 10 are deprecated,表明当前 debian/compat 仍旧是 level 9,需要升级以匹配新的 debhelper 规范。

# 五、最终产物

日志最后阶段生成了 .deb 包:

dpkg-deb: building package 'redis-3-2-0' in '../redis-3-2-0_7.4.0-1_amd64.deb'.
1

image-20250818142519764

最终 .deb 包会存放在上级目录,命名规则符合 redis-版本号_构建号_架构.deb。

#Redis#Stack集成#集成案例#Bigtop#DEB#自动化部署
Step6-Log-编译细节
Step8-Log-制品细节

← Step6-Log-编译细节 Step8-Log-制品细节→

最近更新
01
当前版本 2026/08
08-29
02
把 Ambari Server HA 稳稳地跑起来
08-17
03
从一次启用操作追到主备就绪
08-17
更多文章>
Theme by Vdoing | Copyright © 2017-2026 JaneTTR | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式