linux中,当执行rpm -e删除一个软件包时,都做了些什么事
问题描述:
今天在通过rpm进行删除软件包时,出现了问题,就引发了我对于rpm包执行删除动作时的一些行为做了思考,之前找了很多的文章,后来想如果有debug日志信息,那么不就都清楚了吗
通过打印rpm -e执行删除的调试信息
[root@testvm03 log]# rpm -e -vv mysql-server-5.1.-.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删除一个软件包时,都做了些什么事的更多相关文章
- 十天学Linux内核之第七天---电源开和关时都发生了什么
原文:十天学Linux内核之第七天---电源开和关时都发生了什么 说实话感觉自己快写不下去了,其一是有些勉强跟不上来,其二是感觉自己越写越差,刚开始可能是新鲜感以及很多读者的鼓励,现在就是想快点完成自 ...
- iOS 中push和pop到底系统做了些什么事
iOS中的push和pop是一个很常用的视图切换方法,他们是成对出现的, 简而言之,push就是压栈,pop就是出栈! [self.navigationController pushViewContr ...
- 【转】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 ...
- Linux系列:Linux中如何安装.rpm、.tar、.tar.gz和tar.bz2文件
转载自:https://blog.csdn.net/lanxuezaipiao/article/details/21896579 我以下面三个包为例:(三个包都在/etc/opt下) A. examp ...
- Linux中为什么执行自己的程序要在前面加./
前言 在Linux中,我们执行内置命令时,直接输入命令名称即可,如: $ mv a b #将a重命名为b 而在执行自己写好的程序时,却要带上./,例如: $ hello hello: comm ...
- linux中yum与rpm区别
一.源代码形式 1. 绝大多数开源软件都是直接以原码形式发布的 2. 源代码一般会被打成.tar.gz的归档压缩文件 3. 源代码需要编译成为二进制形式之后才能够运行使用 ...
- LINUX中查看、添加、删除PATH以及永久添加PATH
1.查看PATH变量 echo $PATH 会出现: 路径1:路径2:路径3 2.添加PATH变量 export PATH=$PATH:新添加的路径 用此方法添加的PATH,在关闭或者重启LINUX后 ...
- Linux系统下安装 rpm 软件和源代码 软件包
RPM 安装方式 RPM是一个包安装管理软件,我们可以使用这个工具安装 .rpm 类型的软件.Linux的rpm包很多都能在光盘的Packages 包中找得到.首先挂载一下光盘,查看Packages中 ...
- linux中表示系统信息如cpu mem disk等内容都在 /proc
linux中表示系统信息的 内容都在 /proc 要查看系统的任何信息, 如cpu mem 磁盘等等, 都在 /proc下, 如: cpuinfo ,meminfo diskstatus 等等
随机推荐
- python系统编程(四)
进程池Pool 当需要创建的子进程数量不多时,可以直接利用multiprocessing中的Process动态成生多个进程,但如果是上百甚至上千个目标,手动的去创建进程的工作量巨大,此时就可以用到mu ...
- 2-SAT问题的小结
简介 什么是2-SAT呢?就是有一些集合,每个集合中有且仅有两个元素,且不能同时选取两个元素,集合间的元素存在一定的选择关系,求解可行性及可行方案. 算法 1.连边 2.跑tarjan 3.判可行性, ...
- java输出格式-----System.out.printf()
package com.lzc.test; public class Main { public static void main(String[] args) { // 定义一些变量,用来格式化输出 ...
- 通过DCGAN进行生成花朵
环境是你要安装Keras和Tensorflow 先来个network.py,里面定义了生成器网络和鉴别器网络: # -*- coding: UTF-8 -*- """ D ...
- oracle 分析函数 keep(dense_rank first/last)
SQL : select * from crisis_sales where dept_id = 'D02' order by sale_date; DEPT_ID SALE_DATE GOODS ...
- Linux命令之rpm篇
作业五:rpm命令 1) 挂载光盘文件到/media目录 [root@localhost 桌面]# mount /dev/sr0 /media mount: /dev/sr0 写保护,将以只读方式 ...
- jquery .stop()的用法
jquery的.stop()的用法: 目的:为了 了解stop()的用法,举个例子,直观的方式看看. 实物:一个id="animater"的div包含了一段文字.(以下用anima ...
- iOS链接库的冲突
最近在打包的时候,遇到一个坑.特此记录一下 起因是发现 Unity 5.4 版本,使用c#写的下载,下载速度无法突破 2M/s,同样的网络,后来横向对比使用原来 Cocos2d 开始的游戏,可以达到 ...
- MultipartFile文件编码判断
MultipartFile文件编码判断 搜索:Java 判断文件的字符集编码 https://blog.csdn.net/top_code/article/details/8891796 但是在Mul ...
- 在Ubuntu下添加自定义服务
https://blog.csdn.net/xkjcf/article/details/78698232 在Ubuntu系统中添加自定义服务需要遵从设计启动脚本的模式,下面就是如何编写启动脚本的示例程 ...