rpm

1、rpm -qi查询包的详细信息

[root@centos7 tmp]# rpm -qi tree
Name : tree
Version : 1.6.0
Release : 10.el7
...
[root@centos7 tmp]# rpm -qi nginx
Name : nginx
Epoch : 1
Version : 1.16.0
...

2、rpm -qf查询某个文件来自那个软件包

[root@centos7 tmp]# rpm -qf /etc/nginx/nginx.conf
nginx-1.16.0-1.el7.ngx.x86_64
[root@centos7 tmp]# rpm -qf /etc/my.cnf
mariadb-libs-5.5.60-1.el7_5.x86_64

3、rpm -ql列出某个包的相关文件

[root@centos7 tmp]# rpm -ql nginx
/etc/logrotate.d/nginx
/etc/nginx
/etc/nginx/conf.d
...

4、rpm -e卸载,有依赖卸载不了

[root@centos7 tmp]# rpm -e rpm
error: Failed dependencies:
rpm = 4.11.3-35.el7 is needed by (installed) rpm-libs-4.11.3-35.el7.x86_64
rpm is needed by (installed) color-filesystem-1-13.el7.noarch
rpm = 4.11.3-35.el7 is needed by (installed) rpm-python-4.11.3-35.el7.x86_64
rpm >= 0:4.11.3-22 is needed by (installed) yum-3.4.3-161.el7.centos.noarch
rpm >= 4.1.1 is needed by (installed) createrepo-0.9.9-28.el7.noarch
rpm is needed by (installed) policycoreutils-2.5-29.el7.x86_64

5、rpm -e --nodeps 忽略依赖性,强制卸载

[root@centos7 tmp]# rpm -e rpm --nodeps
# 救援请参考:https://blog.51cto.com/14012942/2426136
# 救援模式注意事项:要指定系统的根安装,如下所示
# [root@centos7 tmp]# rpm -ivh /run/initall/repo/rpm-4.11.3-35.el7.x86_64.rpm --root=/mnt/sysimage
[root@centos7 cd]# rpm --help
-r, --root=ROOT use ROOT as top level directory (default: "/")

6、rpm --import导入密钥


yum

7、yum group list 列出包组

[root@centos7 ~]# yum group list
Loaded plugins: fastestmirror, langpacks
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* extras: mirror.jdcloud.com
* updates: mirror.lzu.edu.cn
Available Environment Groups:
Minimal Install
Compute Node
...

8、yum group info "包组名" 查看包组信息

[root@centos7 ~]# yum group info "Minimal Install"
Loaded plugins: fastestmirror, langpacks
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
* base: mirror.lzu.edu.cn
* extras: mirror.jdcloud.com
* updates: mirror.lzu.edu.cn Environment Group: Minimal Install
Environment-Id: minimal
Description: Basic functionality.
Mandatory Groups:
+core
Optional Groups:
+debugging

9、yum group install "Development Tools安装开发工具包

[root@centos7 ~]# yum group install "Development Tools"

10、卸载包组:yum group remove

11、createrepo创建仓库

12、yum安装mariadb-server,测时间

[root@centos7 dnf]# time yum install mariadb-server.x86_64 -y
Complete! real 0m17.482s
user 0m6.337s
sys 0m3.311s

13、使用yum history undo卸载

[root@centos7 dnf]# yum history
Loaded plugins: fastestmirror, langpacks
ID | Login user | Date and time | Action(s) | Altered
-------------------------------------------------------------------------------
9 | root <root> | 2019-08-03 20:19 | Install | 10
8 | root <root> | 2019-08-03 20:15 | Install | 11
7 | root <root> | 2019-08-03 20:07 | Install | 1
6 | root <root> | 2019-08-03 19:02 | Install | 5
5 | root <root> | 2019-08-03 09:15 | Reinstall | 1
4 | root <root> | 2019-08-02 16:30 | Install | 1
3 | root <root> | 2019-07-29 19:21 | Install | 4
2 | root <root> | 2019-07-29 14:14 | Install | 1 E<
1 | System <unset> | 2019-07-17 16:27 | Install | 1382 >
history list
[root@centos7 dnf]# yum history undo 9

14、dnf安装mariadb,time侧时间

[root@centos7 dnf]# time dnf install mariadb-server.x86_64 -y
Complete! real 0m23.413s
user 0m9.023s
sys 0m4.995s

15、程序包编译

  • 源代码->预处理->编译->汇编->链接->执行
  • c、C++ make项目管理器
  • java:maven

yum.rpm一点点的更多相关文章

  1. 数据仓库004 - 复习Linux shell命令 - vi 进程 端口号 系统命令 高危命令 wget yum rpm压缩

    一.复习 1.vi的使用方法: 1.1 .正常编辑一个文件,保存退出 1.2. 粘贴的坑:必须在i键 编辑模式 2.找error cat xxx.log | grep -C 10 ERROR > ...

  2. yum rpm 命令 linux

    centos的软件安装大致可以分为两种类型: [centos]rpm文件安装,使用rpm指令  类似[ubuntu]deb文件安装,使用dpkg指令 [centos]yum安装   类似[ubuntu ...

  3. yum --rpm包安装

    rpm -ivh  package -i 表示安装install -v表示显示详细信息, -vv更详细些 -h表示显示安装进度 --force:表示强制安装 --nodeps:忽略依赖关系安装 --r ...

  4. 逃不掉的mysql数据库安装方式大全yum rpm 源码

    数据库虽然也不是天天安装,但每次安装都要找来找去挺烦,特整理记录在此. 系统基于:Centos 7.x 数据库版本: MySQL 5.7.x 转载请注明出处 Yum 安装方式 1.下载 yum rep ...

  5. linux中wget 、apt-get、yum rpm区别

    wget 类似于迅雷,是一种下载工具, 通过HTTP.HTTPS.FTP三个最常见的TCP/IP协议下载,并可以使用HTTP代理名字是World Wide Web”与“get”的结合. yum: 是r ...

  6. 【linux下载方式的区别】wget 、apt-get、yum rpm区别

    1.wget 类似于迅雷,是一种下载工具, 通过HTTP.HTTPS.FTP三个最常见的TCP/IP协议下载,并可以使用HTTP代理名字是World Wide Web”与“get”的结合. 2.yum ...

  7. 用yum rpm 快速安装zabbix agent

    用yum 快速安装zabbix agent. wget http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.2-1.el7 ...

  8. 二 JDK + mysql + yum + rpm

    如果系统环境崩溃.   调用/usr/bin/vim /etc/profile   1  网络搭建 2  host配置 3  SSH无密码登录   4  rpm 安装     yum install ...

  9. yum rpm apt-get wget 辨析

    1)wget: 类似于迅雷,是一种下载工具,通过HTTP.HTTPS.FTP三个最常见的TCP/IP协议下载,并可以使用HTTP代理名字是World Wide Web”与“get”的结合.类似于cur ...

随机推荐

  1. django安装以及配置

    一.django的安装和启动 1.安装 pip3 install django==1.11.22 目前来讲1.11.22版本比较稳定 2.django的创建 命令行:cmd先去到django创建目录, ...

  2. 微信小程序路由跳转

    微信小程序路由跳转 1.wx.switchTab(Object object) 这里的tabBar是底下的导航栏指定的页面, 跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面 参数 O ...

  3. docker配置阿里云镜像

    今天docker pull镜像的时候太慢了  所以这里配置下阿里云镜像 打开阿里云控制台,没有的可以用淘宝账号或者支付宝账号直接登录 打开容器镜像服务,镜像加速器,复制加速器地址 修改配置文件 $: ...

  4. Python之random模块和time模块

    1.random()模块的使用   import random x = random.random() y = random.random() print(x,y*10) #random.random ...

  5. Hash Table Implementation in C++

    对于字符串,所用的hash函数为: size_t _Hash_bytes(const void* ptr, size_t len, size_t seed) { static const size_t ...

  6. Python 3 既是激进的又是克制的,这些提议被否决了

    [译]PEP 3099--Python 3 中不会改变的事情 导语: Python 3.8 已经发布了,引进了不少变更点.关于 3.9 预计引入的修改,也披露了一些.我们之前还关注过 GIL 的移除计 ...

  7. 可实现的全局唯一有序ID生成策略

    在博客园搜素全局唯一有序ID,罗列出来的文章大致讲述了以下几个问题,常见的生成全局唯一id的常见方法 :使用数据库自动增长序列实现 : 使用UUID实现:  使用redis实现: 使用Twitter的 ...

  8. 在npm上发布自己的vue组件库(使用npm install 或者 CDN的方式引用)

    一.npm publish发布包到npm库的命令是npm publish npm publish发布包,需要先配置webpack.json文件,如果没有webpack.json文件,可以通过npm i ...

  9. 处理 Could not find a 'KafkaClient' entry in the JAAS configuration. System property 'java.security.auth.login.config' is

    场景 某监控进程需要访问多个集群的Kafka INFO - org.apache.kafka.common.KafkaException: Failed to construct kafka cons ...

  10. 实用脚本awk

    非常实用的awk 有时候需要去服务器下载几个日志 日志太多,翻滚起来很麻烦,操作又慢又复杂. 可以使用这个下载最新的两个文件 ls -lt | head -3 | awk -F ' ' '{if(NR ...