问题描述

  今天在通过rpm进行删除软件包时,出现了问题,就引发了我对于rpm包执行删除动作时的一些行为做了思考,之前找了很多的文章,后来想如果有debug日志信息,那么不就都清楚了吗

通过打印rpm -e执行删除的调试信息

[root@testvm03 log]# rpm -e -vv mysql-server--.el6_8.x86_64
D: loading keyring from pubkeys in /var/lib/rpm/pubkeys/*.key
D: couldn't find any keys in /var/lib/rpm/pubkeys/*.key
D: loading keyring from rpmdb
D: opening  db environment /var/lib/rpm cdb:mpool:joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Name rdonly mode=0x0
D:  read h#     323 Header sanity check: OK
D: added key gpg-pubkey-c105b9de-4e0fd3a3 to keyring
D: Using legacy gpg-pubkey(s) from rpmdb
D:  read h#     350 Header V3 RSA/SHA1 Signature, key ID c105b9de: OK
D: ========== --- mysql-server-5.1.73-8.el6_8 x86_64/linux 0x2
D: opening  db index       /var/lib/rpm/Requirename rdonly mode=0x0
D: ========== recording tsort relations
D:  Requires: ha_archive.so.0()(64bit)                      YES (added provide)
D:  Requires: ha_blackhole.so.0()(64bit)                    YES (added provide)
D:  Requires: ha_example.so.0()(64bit)                      YES (added provide)
D:  Requires: ha_federated.so.0()(64bit)                    YES (added provide)
D:  Requires: ha_innodb_plugin.so.0()(64bit)                YES (added provide)
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth)
D:     0    0    0    0    1   -mysql-server-5.1.73-8.el6_8.x86_64
D: erasing packages
D: closed   db index       /var/lib/rpm/Requirename
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm
D: opening  db environment /var/lib/rpm cdb:mpool:joinenv
D: opening  db index       /var/lib/rpm/Packages create mode=0x42
D: sanity checking 1 elements
D: running pre-transaction scripts
D: computing 99 file fingerprints
D: computing file dispositions
D: opening  db index       /var/lib/rpm/Basenames create mode=0x42
D: 0x0000fd00     4096       799876       374295 /
D: ========== +++ mysql-server-5.1.73-8.el6_8 x86_64-linux 0x2
D:  read h#     350 Header V3 RSA/SHA1 Signature, key ID c105b9de: OK
D:     erase: mysql-server-5.1.73-8.el6_8 has 99 files, test = 0
D: opening  db index       /var/lib/rpm/Name create mode=0x42
D: opening  db index       /var/lib/rpm/Triggername create mode=0x42
D:     erase: %preun(mysql-server-5.1.73-8.el6_8.x86_64) scriptlet start
D:     erase: %preun(mysql-server-5.1.73-8.el6_8.x86_64)    execv(/bin/sh) pid 2114
+ '[' 0 = 0 ']'
+ /sbin/service mysqld stop
+ /sbin/chkconfig --del mysqld
D:     erase: waitpid(2114) rc 2114 status 0 secs 1.078
D: fini      040755  2 ( 600, 600)      4096 /var/run/mysqld
D: fini      100640  1 ( 600, 600)      1672 /var/log/mysqld.log backup
warning: /var/log/mysqld.log saved as /var/log/mysqld.log.rpmsave
D: fini      040755  4 ( 600, 600)      4096 /var/lib/mysql
D:    erase rmdir of /var/lib/mysql failed: Directory not empty
D: fini      100644  1 (   0,   0)     10376 /usr/share/mysql/mysql_test_data_timezone.sql
D: fini      100644  1 (   0,   0)      2855 /usr/share/mysql/mysql_system_tables_data.sql
D: fini      100644  1 (   0,   0)     17285 /usr/share/mysql/mysql_system_tables.sql
D: fini      100644  1 (   0,   0)     45560 /usr/share/mysql/mysql_fix_privilege_tables.sql
D: fini      100644  1 (   0,   0)      2441 /usr/share/mysql/my-small.cnf
D: fini      100644  1 (   0,   0)      4673 /usr/share/mysql/my-medium.cnf
D: fini      100644  1 (   0,   0)      4662 /usr/share/mysql/my-large.cnf
D: fini      100644  1 (   0,   0)     19751 /usr/share/mysql/my-innodb-heavy-4G.cnf
D: fini      100644  1 (   0,   0)      4688 /usr/share/mysql/my-huge.cnf
D: fini      100644  1 (   0,   0)    641349 /usr/share/mysql/fill_help_tables.sql
D: fini      100644  1 (   0,   0)    416238 /usr/share/mysql/errmsg.txt
D: fini      100644  1 (   0,   0)      1626 /usr/share/mysql/config.small.ini
D: fini      100644  1 (   0,   0)      2382 /usr/share/mysql/config.medium.ini
D: fini      100644  1 (   0,   0)      4528 /usr/share/mysql/config.huge.ini
D: fini      100644  1 (   0,   0)     12527 /usr/share/man/man8/mysqlmanager.8.gz
D: fini      100644  1 (   0,   0)      1691 /usr/share/man/man8/mysqld.8.gz
D: fini      100644  1 (   0,   0)      1448 /usr/share/man/man1/resolveip.1.gz
D: fini      100644  1 (   0,   0)      1650 /usr/share/man/man1/resolve_stack_dump.1.gz
D: fini      100644  1 (   0,   0)      1859 /usr/share/man/man1/replace.1.gz
D: fini      100644  1 (   0,   0)      1838 /usr/share/man/man1/perror.1.gz
D: fini      100644  1 (   0,   0)      4970 /usr/share/man/man1/mysqltest.1.gz
D: fini      100644  1 (   0,   0)       416 /usr/share/man/man1/mysqlman.1.gz
D: fini      100644  1 (   0,   0)      4548 /usr/share/man/man1/mysqlimport.1.gz
D: fini      100644  1 (   0,   0)      3187 /usr/share/man/man1/mysqlhotcopy.1.gz
D: fini      100644  1 (   0,   0)      2298 /usr/share/man/man1/mysqldumpslow.1.gz
D: fini      100644  1 (   0,   0)      5381 /usr/share/man/man1/mysqld_safe.1.gz
D: fini      100644  1 (   0,   0)      5592 /usr/share/man/man1/mysqld_multi.1.gz
D: fini      100644  1 (   0,   0)      5695 /usr/share/man/man1/mysqlcheck.1.gz
D: fini      100644  1 (   0,   0)      1609 /usr/share/man/man1/mysqlbug.1.gz
D: fini      100644  1 (   0,   0)     12134 /usr/share/man/man1/mysqlbinlog.1.gz
D: fini      100644  1 (   0,   0)      1654 /usr/share/man/man1/mysql_zap.1.gz
D: fini      100644  1 (   0,   0)      3797 /usr/share/man/man1/mysql_upgrade.1.gz
D: fini      100644  1 (   0,   0)      1833 /usr/share/man/man1/mysql_tzinfo_to_sql.1.gz
D: fini      100644  1 (   0,   0)      1997 /usr/share/man/man1/mysql_setpermission.1.gz
D: fini      100644  1 (   0,   0)      1543 /usr/share/man/man1/mysql_secure_installation.1.gz
D: fini      100644  1 (   0,   0)      2752 /usr/share/man/man1/mysql_install_db.1.gz
D: fini      100644  1 (   0,   0)      2165 /usr/share/man/man1/mysql_fix_privilege_tables.1.gz
D: fini      100644  1 (   0,   0)      1426 /usr/share/man/man1/mysql_fix_extensions.1.gz
D: fini      100644  1 (   0,   0)      2035 /usr/share/man/man1/mysql_convert_table_format.1.gz
D: fini      100644  1 (   0,   0)      2181 /usr/share/man/man1/mysql.server.1.gz
D: fini      100644  1 (   0,   0)      5443 /usr/share/man/man1/myisampack.1.gz
D: fini      100644  1 (   0,   0)      1835 /usr/share/man/man1/myisamlog.1.gz
D: fini      100644  1 (   0,   0)     13582 /usr/share/man/man1/myisamchk.1.gz
D: fini      100644  1 (   0,   0)      2286 /usr/share/man/man1/myisam_ftdump.1.gz
D: fini      100644  1 (   0,   0)      1508 /usr/share/man/man1/msql2mysql.1.gz
D: fini      100644  1 (   0,   0)      1850 /usr/share/man/man1/innochecksum.1.gz
D: fini      100644  1 (   0,   0)      2441 /usr/share/doc/mysql-server-5.1.73/my-small.cnf
D: fini      100644  1 (   0,   0)      4673 /usr/share/doc/mysql-server-5.1.73/my-medium.cnf
D: fini      100644  1 (   0,   0)      4662 /usr/share/doc/mysql-server-5.1.73/my-large.cnf
D: fini      100644  1 (   0,   0)     19751 /usr/share/doc/mysql-server-5.1.73/my-innodb-heavy-4G.cnf
D: fini      100644  1 (   0,   0)      4688 /usr/share/doc/mysql-server-5.1.73/my-huge.cnf
D: fini      040755  2 (   0,   0)      4096 /usr/share/doc/mysql-server-5.1.73
D: fini      100755  1 (   0,   0)   1569176 /usr/libexec/mysqlmanager
D: fini      100755  1 (   0,   0)   7590416 /usr/libexec/mysqld
D: fini      100755  1 (   0,   0)   1259136 /usr/lib64/mysql/plugin/ha_innodb_plugin.so.0.0.0
D: fini      120777  1 (   0,   0)        25 /usr/lib64/mysql/plugin/ha_innodb_plugin.so.0
D: fini      120777  1 (   0,   0)        25 /usr/lib64/mysql/plugin/ha_innodb_plugin.so
D: fini      100755  1 (   0,   0)     58064 /usr/lib64/mysql/plugin/ha_federated.so.0.0.0
D: fini      120777  1 (   0,   0)        21 /usr/lib64/mysql/plugin/ha_federated.so.0
D: fini      120777  1 (   0,   0)        21 /usr/lib64/mysql/plugin/ha_federated.so
D: fini      100755  1 (   0,   0)     33168 /usr/lib64/mysql/plugin/ha_example.so.0.0.0
D: fini      120777  1 (   0,   0)        19 /usr/lib64/mysql/plugin/ha_example.so.0
D: fini      120777  1 (   0,   0)        19 /usr/lib64/mysql/plugin/ha_example.so
D: fini      100755  1 (   0,   0)     30288 /usr/lib64/mysql/plugin/ha_blackhole.so.0.0.0
D: fini      120777  1 (   0,   0)        21 /usr/lib64/mysql/plugin/ha_blackhole.so.0
D: fini      120777  1 (   0,   0)        21 /usr/lib64/mysql/plugin/ha_blackhole.so
D: fini      100755  1 (   0,   0)     54048 /usr/lib64/mysql/plugin/ha_archive.so.0.0.0
D: fini      120777  1 (   0,   0)        19 /usr/lib64/mysql/plugin/ha_archive.so.0
D: fini      120777  1 (   0,   0)        19 /usr/lib64/mysql/plugin/ha_archive.so
D: fini      040755  2 (   0,   0)      4096 /usr/lib64/mysql/plugin
D: fini      100755  1 (   0,   0)   1365648 /usr/bin/resolveip
D: fini      100755  1 (   0,   0)   1369792 /usr/bin/resolve_stack_dump
D: fini      100755  1 (   0,   0)   1369712 /usr/bin/replace
D: fini      100755  1 (   0,   0)   1370544 /usr/bin/perror
D: fini      100755  1 (   0,   0)    187672 /usr/bin/mysqltest
D: fini      100755  1 (   0,   0)     32477 /usr/bin/mysqlhotcopy
D: fini      100755  1 (   0,   0)      7402 /usr/bin/mysqldumpslow
D: fini      100755  1 (   0,   0)     18204 /usr/bin/mysqld_safe
D: fini      100755  1 (   0,   0)     24495 /usr/bin/mysqld_multi
D: fini      100755  1 (   0,   0)      4808 /usr/bin/mysqlbug
D: fini      100755  1 (   0,   0)      3888 /usr/bin/mysql_zap
D: fini      100755  1 (   0,   0)     68176 /usr/bin/mysql_upgrade
D: fini      100755  1 (   0,   0)   1357920 /usr/bin/mysql_tzinfo_to_sql
D: fini      100755  1 (   0,   0)     17473 /usr/bin/mysql_setpermission
D: fini      100755  1 (   0,   0)      8198 /usr/bin/mysql_secure_installation
D: fini      100755  1 (   0,   0)     14646 /usr/bin/mysql_install_db
D: fini      100755  1 (   0,   0)      5834 /usr/bin/mysql_fix_privilege_tables
D: fini      100755  1 (   0,   0)      1261 /usr/bin/mysql_fix_extensions
D: fini      100755  1 (   0,   0)      4245 /usr/bin/mysql_convert_table_format
D: fini      100755  1 (   0,   0)   1671864 /usr/bin/myisampack
D: fini      100755  1 (   0,   0)   1639184 /usr/bin/myisamlog
D: fini      100755  1 (   0,   0)   1756720 /usr/bin/myisamchk
D: fini      100755  1 (   0,   0)   1642392 /usr/bin/myisam_ftdump
D: fini      100755  1 (   0,   0)     10024 /usr/bin/innochecksum
D: fini      100755  1 (   0,   0)      7026 /etc/rc.d/init.d/mysqld
D: fini      100644  1 (   0,   0)       871 /etc/logrotate.d/mysqld
D:     erase: %postun(mysql-server-5.1.73-8.el6_8.x86_64) scriptlet start
D:     erase: %postun(mysql-server-5.1.73-8.el6_8.x86_64)    execv(/bin/sh) pid 2155
+ '[' 0 -ge 1 ']'
D:     erase: waitpid(2155) rc 2155 status 0 secs 0.002
D:   --- h#     350 mysql-server-5.1.73-8.el6_8.x86_64
D: removing "mysql-server" from Name index.
D: removing 99 entries from Basenames index.
D: opening  db index       /var/lib/rpm/Group create mode=0x42
D: removing "Applications/Databases" from Group index.
D: opening  db index       /var/lib/rpm/Requirename create mode=0x42
D: removing 68 entries from Requirename index.
D: opening  db index       /var/lib/rpm/Providename create mode=0x42
D: removing 8 entries from Providename index.
D: opening  db index       /var/lib/rpm/Conflictname create mode=0x42
D: removing 1 entries from Conflictname index.
D: opening  db index       /var/lib/rpm/Dirnames create mode=0x42
D: removing 14 entries from Dirnames index.
D: opening  db index       /var/lib/rpm/Requireversion create mode=0x42
D: removing 68 entries from Requireversion index.
D: opening  db index       /var/lib/rpm/Provideversion create mode=0x42
D: removing 8 entries from Provideversion index.
D: opening  db index       /var/lib/rpm/Installtid create mode=0x42
D: removing 1 entries from Installtid index.
D: opening  db index       /var/lib/rpm/Sigmd5 create mode=0x42
D: removing 1 entries from Sigmd5 index.
D: opening  db index       /var/lib/rpm/Sha1header create mode=0x42
D: removing "216aec29bd69c731019b4def5cf20d01f47cd1e0" from Sha1header index.
D: opening  db index       /var/lib/rpm/Filedigests create mode=0x42
D: removing 99 entries from Filedigests index.
D: running post-transaction scripts
D: closed   db index       /var/lib/rpm/Filedigests
D: closed   db index       /var/lib/rpm/Sha1header
D: closed   db index       /var/lib/rpm/Sigmd5
D: closed   db index       /var/lib/rpm/Installtid
D: closed   db index       /var/lib/rpm/Provideversion
D: closed   db index       /var/lib/rpm/Requireversion
D: closed   db index       /var/lib/rpm/Dirnames
D: closed   db index       /var/lib/rpm/Triggername
D: closed   db index       /var/lib/rpm/Conflictname
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Requirename
D: closed   db index       /var/lib/rpm/Group
D: closed   db index       /var/lib/rpm/Basenames
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm

主要步骤

1.检查rpm库,是否有依赖关系

2.执行预删除操作,比如,停掉服务,删除开机启动等内容

3.删除具体的生成的文件,备份配置文件

4.删除rpm库中的文件。

文档创建时间:2019年3月8日15:03:27

linux中,当执行rpm -e删除一个软件包时,都做了些什么事的更多相关文章

  1. 十天学Linux内核之第七天---电源开和关时都发生了什么

    原文:十天学Linux内核之第七天---电源开和关时都发生了什么 说实话感觉自己快写不下去了,其一是有些勉强跟不上来,其二是感觉自己越写越差,刚开始可能是新鲜感以及很多读者的鼓励,现在就是想快点完成自 ...

  2. 【转】Linux中如何安装.rpm、.tar、.tar.gz和tar.bz2

    我以下面三个包为例:(三个包都在/etc/opt下)A.example-1.2.3-1.rpmB.example-1.2.3-1.tarC.example-1.2.3-1.tar.gz 1.对于rpm ...

  3. Linux系列:Linux中如何安装.rpm、.tar、.tar.gz和tar.bz2文件

    转载自:https://blog.csdn.net/lanxuezaipiao/article/details/21896579 我以下面三个包为例:(三个包都在/etc/opt下) A. examp ...

  4. linux中yum与rpm区别

    一.源代码形式 1.      绝大多数开源软件都是直接以原码形式发布的 2.      源代码一般会被打成.tar.gz的归档压缩文件 3.      源代码需要编译成为二进制形式之后才能够运行使用 ...

  5. linux中WDCP的日志彻底删除技巧

    apache或nginx都有开关默认日志,一个是正常访问日志,一个是错误的日志,目录在 /www/wdlinux/nginx-1.0.15/logs /www/wdlinux/httpd-2.2.22 ...

  6. Linux中exec()执行文件系列函数的使用说明

    函数原型: 描述:    exec()系列函数使用新的进程映像替换当前进程映像.    工作方式没有什么差别, 只是参数传递的方式不同罢了. 说明:    1. 这6个函数可分为两大类: execl( ...

  7. Linux中添加、修改和删除用户和用户组

    宽为限 紧用功 功夫到 滞塞通 一.用户: 在创建用户时,需要为新建用户指定一用户组,如果不指定其用户所属的工作组,自动会生成一个与用户名同名的工作组.创建用户user1的时候指定其所属工作组user ...

  8. Linux 中,如何显示 (gcc)make时实际执行命令

    问题: 调试编译问题,如何获取,GCC(或许make)时,实际编译器和链接器正在执行的命令? 解决方法: 方法一:通用方法 使用dry run,如下 $ make -n 这将显示make 命令正在试图 ...

  9. linux 中定时执行python脚本

    一.让Python随Linux开机自动运行 准备好要自启的脚本auto.py 用root权限编辑以下文件 sudo vim /ect/rc.local 在exit 0上面编辑启动脚本的命令(编辑rc. ...

随机推荐

  1. Security Policy:行级安全(Row-Level Security)

    行级安全RLS(Row-Level Security)是在数据行级别上控制用户的访问,控制用户只能访问数据库表的特定数据行.断言是逻辑表达式,在SQL Server 2016中,RLS是基于安全断言( ...

  2. IT基础架构规划方案二(计算机系统与机房规划规划)

    计算机系统规划       服务器硬件选型规划方案       根据对某集团的实际调研,获取了企业业务应用系统的建设情况,随着企业信息化建设的推进,需要对各种信息化管理系统和应用系统的服务器选型进行选 ...

  3. 集成 Kendo UI for Angular 2 控件

    伴随着 Angular 2 的正式 release,Kendo UI for Angular 2 的第一批控件已经发布了,当前是 Beta 版本,免费使用. 官方站点:Kendo UI for Ang ...

  4. z-index学习知识小结

    一.z-index七阶层叠顺序表 1.层叠顺序的大小比较: background/border < 负z-index < block块状水平盒子 < float浮动盒子 < i ...

  5. ADB调试桥安装(方式一)

    一.ADB简介 adb的全称为Android Debug Bridge,起到调试桥的作用.它android sdk里的一个工具, 用这个工具可以直接操作管理 android模拟器或者真实的androi ...

  6. 自定义ShareDialog视图

    1. share_item.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayou ...

  7. ThinkPHP创建应用的一般开发流程

    使用ThinkPHP创建应用的一般开发流程是: 系统设计.创建数据库和数据表:(可选) 项目命名并创建项目入口文件,开启调试模式: 完成项目配置: 创建项目函数库:(可选) 开发项目需要的扩展(模式. ...

  8. B-dya6

    1.昨天的困难,今天解决的进度,以及明天要做的事情 昨天的困难:在导入导出方面遇到了困难,导出的文件不能直接导入. 今天解决的进度:完成了登录页面的背景设计,并再次测试了整个系统的功能. 明天要做的事 ...

  9. CompletableFuture基本用法

    异步计算 所谓异步调用其实就是实现一个可无需等待被调用函数的返回值而让操作继续运行的方法.在 Java 语言中,简单的讲就是另启一个线程来完成调用中的部分计算,使调用继续运行或返回,而不需要等待计算结 ...

  10. R语言预测实战(游浩麟)笔记1

    预测流程 确定主题.指标.主体.精度.周期.用户.成本和数据七要素. 收集数据.内容划分.收集原则. 选择方法.主要方法有自相关分析.偏相关分析.频谱分析.趋势分析.聚类分析.关联分析.相关分析.互相 ...