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. taro taroUi的H5打包后路径/修改为./

      打包文件路径修改在config/index.tsx中,如下 esnextModules: ['taro-ui'],配置也需要在h5中写入并且将publicPath: './'即可,不需要在做一个h ...

  2. C、C++的Makefile模板

    目录 Makefile模板 用法 编译C程序 编译C++程序 其他 Tips Makefile模板 CC = gcc LD = $(CC) TARGET = $(notdir $(CURDIR)) S ...

  3. C 自删除技术---批处理方式

    #include<stdio.h> #include<windows.h>#pragma comment(linker, "/subsystem:\"win ...

  4. 零基础转行web前端,要学习多久?需要掌握些什么?

    web前端开发技术人才越来越吃香,而且web前端领域划分越来越细,对技术的需求越来越高,想学习web前端的人也是越来越多.那么,如何学习web前端知识?从哪开始?转型成为web前端工程师需要学些什么? ...

  5. p0wnedshell的介绍与使用

    0x01 前言 p0wnedShell是一个用c#编写的攻击性PowerShell主机应用程序,它不依赖于PowerShell .exe,而是在PowerShell runspace环境(. net) ...

  6. s32k144 bootloader

    s32k144 bootloader升级 mcu       : s32k144 can_tool : kvaser  摘要:实现can升级app程序,现在网上大多是CAN_FD升级bootloade ...

  7. netty中Pipeline的ChannelHandler执行顺序案例详解

    一.netty的Pipeline模型 netty的Pipeline模型用的是责任链设计模式,当boss线程监控到绑定端口上有accept事件,此时会为该socket连接实例化Pipeline,并将In ...

  8. 百万年薪python之路 -- 异常处理

    异常处理 1.错误的分类: 1.语法错误:(这种错误,根本过不了python解释器的语法检测,必须在程序执行前就改正) #语法错误示范一 if #语法错误示范二 def test: pass #语法错 ...

  9. node项目发布+域名及其二级域名配置+nginx反向代理+pm2

    学习node的时候也写了一些demo.但是只是限于本地测试,从来没有发布.今天尝试发布项目. 需要准备的东西 node 项目:为了突出重点,说明主要问题.我只是拿express 写了很简单的demo. ...

  10. Unity调用Android

    1.Unity调用Android 根据unity用户手册,unity可以采用native code(c/c++),但是也提供了C#调用方法,本文对此进行简单讲解. 2.Unity获取android类 ...