• yum.rpm一点点


    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
  • 相关阅读:
    工厂设计模式
    二分查找(java实现)
    集合
    JS中,根据div数值判断弹出窗口
    用JS,打印正立三角形
    用JS,打印99乘法表
    用JS,求斐波那契数列第n项的值
    用JS 循环做一个表格
    JS中,如何判断一个被转换的数是否是NaN
    用JS写一个简单的程序,算出100中7的倍数的最大值
  • 原文地址:https://www.cnblogs.com/uscWIFI/p/11296202.html
Copyright © 2020-2023  润新知