问题描述

  今天在通过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. iOS 中push和pop到底系统做了些什么事

    iOS中的push和pop是一个很常用的视图切换方法,他们是成对出现的, 简而言之,push就是压栈,pop就是出栈! [self.navigationController pushViewContr ...

  3. 【转】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 ...

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

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

  5. linux中yum与rpm区别

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

  6. Linux系统下安装 rpm 软件和源代码 软件包

    RPM 安装方式 RPM是一个包安装管理软件,我们可以使用这个工具安装 .rpm 类型的软件.Linux的rpm包很多都能在光盘的Packages 包中找得到.首先挂载一下光盘,查看Packages中 ...

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

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

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

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

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

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

随机推荐

  1. 1128ORDER BY的原理

     工作过程中,各种业务需求在访问数据库的时候要求有order by排序.有时候不必要的或者不合理的排序操作很可能导致数据库系统崩溃.如何处理好order by排序呢?本文从原理以及优化层面介绍 ord ...

  2. .NET VS2012 将代码同步上传到 oschina.net 和 github

    1.先首要注册两个账号 https://github.com/ http://git.oschina.net/ 2.下载 getextendions http://sourceforge.net/pr ...

  3. Python基础教程之第2章 列表和元组

    D:\>python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Typ ...

  4. cocos2dx中创建动画的三种方法

    1.最最原始的方法,先创建动画帧,再创建动画打包(animation),再创建动画(animate) 第一步: 创建动画帧:CCSpriteFrame,依赖于原始的资源图片(xx.png,xx.jpg ...

  5. Python一路走来 - python基础 数据类型

    对于Python,一切事物都是对象,对象基于类创建 Python数据类型 python主要的数据类型主要包括以下几种类型: (1) 数字型 (2) 字符串 (3) 列表 (4) 元组 (5) 字典 ( ...

  6. openStack kilo 手动Manual部署随笔记录

    一 ,基于neutron网络资源主机(控制节点,网络节点,计算节点)网络规划配置 1, controller.cc 节点 网络配置截图

  7. banner背景通栏

     background: #76CEF6 url("../images/bg.jpg") repeat-x 0 0;  -webkit-background-size: 100%; ...

  8. Linux学习:netstat命令

    Netstat 命令用于显示各种网络相关信息,如网络连接,路由表,接口状态等.对于开发来说,很多时候用于查看端口占用情况. 执行netstat命令,其输出结果可以分成两部分: 1)一是“Active ...

  9. c++ 对象作为参数传递

    对象作为参数传递时是传值.把实参的对象赋值给形参.因此效率有点低. c++传参方式可以分为2种: 1.传值 (指针作为参数,本质上也只是把地址作为值传递了而已). 2.传引用. 所以,一切传递方式不是 ...

  10. The Nerd Factor SPOJ - MYQ5

    The Nerd Factor Time Limit: 1000MS   Memory Limit: Unknown   64bit IO Format: %lld & %llu [Submi ...