Yum 명령 기록을 보는 방법 (업데이트, 설치, 제거)?


34

아파치 로그에 일부 오류가 표시되며 Yum을 사용하여 최근 설치 / 제거한 일부 패키지와 관련이있을 수 있습니다.

업데이트 / 설치 / 제거 된 Yum 패키지의 기록을 볼 수있는 방법이 있습니까?

유닉스에서 "history"명령을 사용할 수 있지만 일부 설치는 다른 계정으로 수행되었을 수 있습니다. 웹을 검색하고 매뉴얼 페이지를 읽으려고했지만 아무것도 찾지 못했습니다.

답변:


17

잘,

yum history

작업도 수행합니다.


CentOS에서 작동하지 않는 것 같습니다 (적어도 설치하지 않았습니다).
— 대런 찬 디싱

그래. 페도라 만.
— lzap

2
이제 CentOS 6.2 ( "yum help history")부터 있습니다. "모든 좋은 것은 기다리는 사람들에게옵니다 ...", "그들"은 다운 스트림 사용자이고 "좋은 것"은 안정적인 소프트웨어입니다. 개인적으로, 나는 종종 기다리기 너무 참을성이 없다 ....
— michael

39

나는 당신이 찾고있는 yum로그 파일 에서 찾고있는 것을 찾을 수 있다고 생각합니다 ./var/log/yum.log


1
설치된 패키지의 전체 목록을 원하는 경우, 언제 또는 무슨 일이 있었는지 (업데이트 / 설치) 다음과 같이하십시오.cat /var/log/yum.log | sed "s#.\+: \?\(.\+\)#\1#" | sort | tee /tmp/yum.install.list.txt
— nickboldt

7

예를 들면 다음과 같습니다.

history 역사 목록

[root ~]> yum history list
Loaded plugins: dellsysidplugin2, fastestmirror, refresh-packagekit
ID     | Login user             | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
 2 | User <username>        | 2010-01-19 15:10 | Erase          |    1
 1 | User <username>        | 2010-01-19 14:55 | Update         |    3
history list

ID 2의 이력 정보 표시

[root ~]> yum history info 2
Loaded plugins: dellsysidplugin2, fastestmirror, refresh-packagekit
Transaction ID : 2
Begin time     : Tue Jan 19 15:10:13 2010
Begin rpmdb    : 2431:fe4c2c846fd45c9125fb8ab27542a27b22e0d3df
End time       :            15:10:27 2010 (14 seconds)
End rpmdb      : 2430:2eeb12b0b0f2ef3fcb31b4447b439e76e92e3866
User           : User <username>
Return-Code    : Success
Transaction performed with:
Installed    rpm-4.7.2-1.fc12.i686
Installed    yum-3.2.25-1.fc12.noarch
Installed    yum-plugin-fastestmirror-1.1.24-2.fc12.noarch
Packages Altered:
Erase        arora-0.10.2-2.fc12.i686
history info

1

목록 패키지에 당신이 설치 한이 시도 :

alias yum-userinstall="yumdb search command_line install* | grep command_line\ = | sort | uniq | sed -r -e 's/command_line = (.*)/yum \1/g'"

결과:

# yum-userinstall
     yum install bind-utils
     yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
     yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
     yum install lsof
     yum install nano
     yum install nfs-utils libnfsidmap
     yum install nmap-ncat
     yum install openscap-scanner
     yum install open-vm-tools

PS1 : 의존성을 보이지 않습니다

PS2 : 알파벳순으로 정렬

PS3 : 나중에 패키지를 제거한 경우 표시되지 않습니다


당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.