黑帽联盟

 找回密码
 会员注册
查看: 1859|回复: 0
打印 上一主题 下一主题

[基础服务] RPM多种用法(举例)及在CentOS中干掉console-kit-daemon

[复制链接]

293

主题

18

听众

955

积分

管理员

Rank: 9Rank: 9Rank: 9

  • TA的每日心情
    奋斗
    2023-10-26 13:13
  • 签到天数: 358 天

    [LV.8]以坛为家I

    今天优化系统的时候,发现有个占用系统资源比较多的 console-kit-daemon 进程/线程

      为了在CentOSv6.2系统当中消灭它(原来那玩意儿用于用户快速切换),特在网上找了一些 RPM 命令的用法,记录如下。

      ● 查看内存里面的进程名字
         ps -eLf | more  一页一页地查看 (不光进程,线程也会列出来,注意中间那个L是大写字母)



    ================================
    ● 一般常用的 安装命令就是 rpm -ivh 软件包名.rpm


    ● rpm 强制删除  rpm -e 软件包名 --nodeps

        --test  可以用于做演习, 并没有真正删除或者安装进去


    ● 找出执行文件路径
    • which console-kit-daemon  
    •   
    • /usr/sbin/console-kit-daemon  






    ● 查看该文件属于哪个 RPM包
    • rpm -qif /usr/sbin/console-kit-daemon  
    •   
    • Name        : ConsoleKit                   Relocations: (not relocatable)  
    • Version     : 0.4.1                             Vendor: CentOS  
    • Release     : 3.el6                         Build Date: Thu 11 Nov 2010 02:50:34 AM CST  
    • Install Date: Sat 29 Jun 2013 07:51:43 PM CST      Build Host: c6b1.bsys.dev.centos.org  
    • Group       : System Environment/Libraries   Source RPM: ConsoleKit-0.4.1-3.el6.src.rpm  
    • Size        : 252541                           License: GPLv2+  
    • Signature   : RSA/8, Sun 03 Jul 2011 12:03:00 PM CST, Key ID 0946fca2c105b9de  
    • Packager    : CentOS BuildSystem <http://bugs.centos.org>  
    • URL         : http://www.freedesktop.org/wiki/Software/ConsoleKit  
    • Summary     : System daemon for tracking users, sessions and seats  
    • Description :  
    • ConsoleKit is a system daemon for tracking what users are logged  
    • into the system and how they interact with the computer (e.g.  
    • which keyboard and mouse they use).  
    • It provides asynchronous notification via the system message bus.   







    ● 好了,知道了包大致名称,寻找一些究竟有多少个和他相关的已经安装的包
    • rpm -qa |grep ConsoleKit  
    •   
    • ConsoleKit-libs-0.4.1-3.el6.i686  
    • ConsoleKit-0.4.1-3.el6.i686  
    • ConsoleKit-x11-0.4.1-3.el6.i686   







    ● 用下面这个命令可以看看该安装报下面究竟都有些什么文件(列出文件清单)
    • rpm -ql  ConsoleKit-x11-0.4.1-3.el6.i686  
    •   
    • /usr/libexec/ck-collect-session-info  
    • /usr/libexec/ck-get-x11-display-device  
    • /usr/libexec/ck-get-x11-server-pid  







    ------------------------------------------------------
    ———————————————————————————
    ● 我们有一个安装包, 在安装前我们想知道他里面究竟要安装哪些文件到我们的系统当中去
    • rpm -qpl ConsoleKit-0.4.1-3.el6.i686.rpm  
    •   
    • warning: ConsoleKit-0.4.1-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY  
    • /etc/ConsoleKit  
    • /etc/ConsoleKit/run-seat.d  
    • /etc/ConsoleKit/run-session.d  
    • /etc/ConsoleKit/seats.d  
    • /etc/ConsoleKit/seats.d/00-primary.seat  
    • /etc/dbus-1/system.d/ConsoleKit.conf  
    • /etc/event.d/ck-log-system-restart  
    • /etc/event.d/ck-log-system-start  
    • /etc/event.d/ck-log-system-stop  
    • /usr/bin/ck-history  
    • /usr/bin/ck-launch-session  
    • /usr/bin/ck-list-sessions  
    • /usr/lib/ConsoleKit  
    • /usr/lib/ConsoleKit/run-seat.d  
    • /usr/lib/ConsoleKit/run-session.d  
    • /usr/lib/ConsoleKit/scripts  
    • /usr/lib/ConsoleKit/scripts/ck-system-restart  
    • /usr/lib/ConsoleKit/scripts/ck-system-stop  
    • /usr/sbin/ck-log-system-restart  
    • /usr/sbin/ck-log-system-start  
    • /usr/sbin/ck-log-system-stop  
    • /usr/sbin/console-kit-daemon  
    • /usr/share/dbus-1/system-services/org.freedesktop.ConsoleKit.service  
    • /usr/share/doc/ConsoleKit-0.4.1  
    • /usr/share/doc/ConsoleKit-0.4.1/AUTHORS  
    • /usr/share/doc/ConsoleKit-0.4.1/COPYING  
    • /usr/share/doc/ConsoleKit-0.4.1/NEWS  
    • /usr/share/doc/ConsoleKit-0.4.1/README  
    • /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy  
    • /var/log/ConsoleKit  
    • /var/run/ConsoleKit   






    ● 当然, 用 rpm -qpi 参数可以查看该安装包的 详细信息。
    • rpm -qpi ConsoleKit-devel-0.4.1-3.el6.i686.rpm  
    •   
    • warning: ConsoleKit-devel-0.4.1-3.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY  
    • Name        : ConsoleKit-devel             Relocations: (not relocatable)  
    • Version     : 0.4.1                             Vendor: CentOS  
    • Release     : 3.el6                         Build Date: Thu 11 Nov 2010 05:55:19 AM CST  
    • Install Date: (not installed)               Build Host: c5b2.bsys.dev.centos.org  
    • Group       : Development/Libraries         Source RPM: ConsoleKit-0.4.1-3.el6.src.rpm  
    • Size        : 39204                            License: MIT  
    • Signature   : RSA/8, Sun 03 Jul 2011 12:03:00 PM CST, Key ID 0946fca2c105b9de  
    • Packager    : CentOS BuildSystem <http://bugs.centos.org>  
    • URL         : http://www.freedesktop.org/wiki/Software/ConsoleKit  
    • Summary     : Development files for ConsoleKit  
    • Description :  
    • This package contains headers and libraries needed for  
    • developing software that is interacting with ConsoleKit.  



    帖子永久地址: 

    黑帽联盟 - 论坛版权1、本主题所有言论和图片纯属会员个人意见,与本论坛立场无关
    2、本站所有主题由该帖子作者发表,该帖子作者与黑帽联盟享有帖子相关版权
    3、其他单位或个人使用、转载或引用本文时必须同时征得该帖子作者和黑帽联盟的同意
    4、帖子作者须承担一切因本文发表而直接或间接导致的民事或刑事法律责任
    5、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责
    6、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
    7、黑帽联盟管理员和版主有权不事先通知发贴者而删除本文

    您需要登录后才可以回帖 登录 | 会员注册

    发布主题 !fastreply! 收藏帖子 返回列表 搜索
    回顶部