yum ์ฃผ์š” ์‚ฌ์šฉ๋ฒ• ๋ฐ ๊ณ ๊ธ‰ ์‚ฌ์šฉ๋ฒ• (history ๊ด€๋ฆฌ, plugin ์‚ฌ์šฉ, ํŠธ๋žœ์žญ์…˜ undo ๋“ฑ)

๊ฐœ์š”

yum ์€ย Yellowdog Updater Modified ์˜ ์•ฝ์ž๋กœ ๋Œ€ํ™”ํ˜• ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ ์‹œ์Šคํ…œ์ด๋‹ค. wikipedia ์— ๋”ฐ๋ฅด๋ฉด Duke ๋Œ€ํ•™๊ต์˜ย ๋ฌผ๋ฆฌํ•™๊ณผ์—์„œ ์‚ฌ์šฉํ•˜๋Š” Red Hat Linux ์‹œ์Šคํ…œ์˜ ๊ด€๋ฆฌ๋ฅผ ํŽธํ•˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด ๋งŒ๋“ค์–ด ์กŒ๋‹ค๊ณ  ํ•œ๋‹ค.

Slackware ๋•Œ ์‚ฌ์šฉํ•˜๋˜ .tgz ํŒจํ‚ค์ง€์— ๋น„ํ•ด rpm ์€ ์˜์กด์„ฑ ๊ด€๋ฆฌ์™€ ๋ฒ„์ „ ๊ด€๋ฆฌ๋ผ๋Š” ์žฅ์ ์ด ์žˆ์—ˆ์ง€๋งŒ ์‹ค์ œ rpm ์œผ๋กœ Linux ์‹œ์Šคํ…œ์„ ๊ด€๋ฆฌํ•  ๊ฒฝ์šฐ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ๋‹ค.

  • ํŠน์ • rpm ์— ์˜์กด์„ฑ ์žˆ๋Š” ํŒจํ‚ค์ง€๊ฐ€ ์žˆ์„ ๊ฒฝ์šฐ ์ผ์ผ์ด ๋‹ค์šด๋ฐ›์•„์„œ ์˜์กด์„ฑ ์žˆ๋Š” rpm์„ ์„ค์น˜ํ•ด์•ผ ํ•จ.
  • rpm ์ด update ๋์„ ๊ฒฝ์šฐ ย update ๋๋‹ค๋Š” ์‚ฌ์‹ค์„ ์•Œ๊ธฐ๊ฐ€ ์–ด๋ ค์›€(ํŒจํ‚ค์ง€๋งˆ๋‹ค ์ง์ ‘ ํ™•์ธ ํ•„์š”)

yum ์€ central repository ๋ฅผ ํ†ตํ•ด rpm ์„ ๋ฐฐํฌํ•˜๊ณ  ์˜์กด์„ฑ ๊ด€๋ฆฌ๋ฅผ ํ•˜๋ฏ€๋กœ ์†์‰ฝ๊ฒŒ ํŒจํ‚ค์ง€๋ฅผ ๊ด€๋ฆฌํ• ์ˆ˜ ์žˆ๋‹ค.


์ฃผ์š” ๋ช…๋ น์–ด์™€ ์˜ต์…˜

yum ์€ command ์™€ option ์œผ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ๋‹ค. yum --help ๋กœ ์ „์ฒด ๋ช…๋ น์–ด์™€ ์˜ต์…˜์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

๋งŽ์ด ์“ฐ์ด๋Š” options ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

--enablerepo=[repo]์—ฌ๋Ÿฌ๊ฐœ์˜ yum repository๊ฐ€ ์žˆ์„ ๊ฒฝ์šฐ ์‚ฌ์šฉํ•  repos ๋ฅผ ์ง€์ •ํ•œ๋‹ค. * ๊ฐ™์€ wildcard๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.
--disablerepo=[repo]์‚ฌ์šฉํ•˜์ง€ ์•Š์„ repos ๋ฅผ ์ง€์ •ํ•œ๋‹ค. wildcard ์‚ฌ์šฉ ๊ฐ€๋Šฅ
--nogpgcheckGPG ์„œ๋ช…๊ฒ€์ฆ์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค. ํ•ด๋‹น repos ์˜ ๊ณต๊ฐœํ‚ค๊ฐ€ ์—†์–ด์„œ ์„œ๋ช…๊ฒ€์ฆ์— ์‹คํŒจํ•  ๊ฒฝ์šฐ์— ์‚ฌ์šฉํ•œ๋‹ค.
-d [debug level]debugging level์„ ์ง€์ •ํ•œ๋‹ค. 0 - 10 ๊นŒ์ง€ ๊ฐ€๋Šฅํ•˜๋ฉฐ ์ˆซ์ž๊ฐ€ ํด์ˆ˜๋ก ์ž์„ธํ•œ ์ •๋ณด๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค.
-y, --assumeyesyum ์ง„ํ–‰์ค‘ ๋‚˜์˜ค๋Š” ์งˆ๋ฌธ์„ ๋ชจ๋‘ yes ๋กœ ์ฒ˜๋ฆฌํ•œ๋‹ค. ์‚ญ์ œํ•  ๊ฒฝ์šฐ์—๋Š” ์˜์กด์„ฑ์žˆ๋Š” ๋ชจ๋“  ํŒจํ‚ค์ง€๊นŒ์ง€ ์‚ญ์ œ๋˜๋ฏ€๋กœ ์ฃผ์˜ํ•ด์•ผ ํ•œ๋‹ค.


install

ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•œ๋‹ค. ์˜์กด์„ฑ์žˆ๋Š” ํŒจํ‚ค์ง€๊นŒ์ง€ ๊ฐ™์ด ์„ค์น˜ํ•ด ์ค€๋‹ค.

updateย 

yum update httpd ์™€ ๊ฐ™์ด ํŒจํ‚ค์ง€๋ช…์ด ์ฃผ์–ด์งˆ ๊ฒฝ์šฐ ํ•ด๋‹น ํŒจํ‚ค์ง€์˜ ์ƒˆ ๋ฒ„์ „์ด ์žˆ์œผ๋ฉด update ํ•œ๋‹ค. ํŒจํ‚ค์ง€๋ช…์ด ์—†์„ ๊ฒฝ์šฐ ์ „์ฒด ์‹œ์Šคํ…œ์—์„œ update ๋  ํŒจํ‚ค์ง€๋ฅผ ํ™•์ธํ›„ update ํ•œ๋‹ค. -y ์˜ต์…˜์„ ์ค„ ๊ฒฝ์šฐ ๋ฌป์ง€ ์•Š๊ณ  ์—…๋ฐ์ดํŠธํ•˜๋ฏ€๋กœ ์ฃผ์˜ํ•ด์•ผ ํ•œ๋‹ค.

์ „์ฒด update ์ˆ˜ํ–‰์‹œ ๋ฐฐํฌ๋ณธ์˜ minor ๋ฒ„์ „์ด ๋ณ€๊ฒฝ๋  ์ˆ˜ ์žˆ๋‹ค. Ex: RHEL 6.1 -> 6.4

check-update

update ๋  ํŒจํ‚ค์ง€์˜ ๋ชฉ๋ก์„ ์ถœ๋ ฅํ•œ๋‹ค.

clean

The following are the ways which you can invoke yum in clean mode. Note that "all files" in the commands below meansย "all files in currently enabled repositories". If you want to also clean any (temporarily) disabled repositories youย need to use --enablerepo=โ€™*โ€™ option.


check

check Checks the local rpmdb and produces information on any problems it finds. You can pass the check command theย arguments "dependencies" or "duplicates", to limit the checking that is performed (the default is "all" whichย does both).

The info command can also take ranges of transaction ids, of the form start..end, which will then display aย merged history as if all the transactions in the range had happened at once.

Eg. "history info 1..4" will merge the first four transactions and display them as a single transaction.ย help Produces help, either for all commands or if given a command name then the help for that particular command.


repolist

ํ˜„์žฌ ๋“ฑ๋ก๋œ repossitory list ๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค. repository ์„ค์ •์€ /etc/yum.repos.d/ ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

yum search string

ํŒจํ‚ค์ง€๋ช… ๋ฐ description ์— "string" ๋“ค์–ด๊ฐ„ ํŒจํ‚ค์ง€๋“ค์„ ์ถœ๋ ฅํ•œ๋‹ค.ย 

provides

yum search path-string

ํŒจํ‚ค์ง€์— ํฌํ•จ๋œ ํŒŒ์ผ๋ช…์ด string ๊ณผ ์ผ์น˜ํ•˜๋Š” ํŒจํ‚ค์ง€๋“ค์„ ์ถœ๋ ฅํ•œ๋‹ค. ย ์˜ˆ๋กœ ๋‹ค์Œ ๋ช…๋ น์–ด๋Š” httpd.conf ๋ž€ ํŒŒ์ผ์ด ์žˆ๋Š” ๋ชจ๋“  ํŒจํ‚ค์ง€๋ฅผ ์ถœ๋ ฅํ•œ๋‹ค.

yum provides '*/httpd.conf'
ย 
389-admin-1.1.29-1.el6.i686 : 389 Administration Server (admin)
Repo        : epel
Matched from:
Filename    : /etc/dirsrv/admin-serv/httpd.conf
piranha-0.8.6-2.el6_4.1.x86_64 : Cluster administation tools
Repo        : updates
Matched from:
Filename    : /etc/sysconfig/ha/conf/httpd.conf

์œ„์™€ ๊ฐ™์ด /etc/dirsrv/admin-serv/์— ์žˆ๋Š” httpd.conf ๋„ ์ถœ๋ ฅ์ด ๋œ๋‹ค. /etc/httpd/ ๋ฐ‘์— httpd.conf ๊ฐ€ ์žˆ๋Š” ํŒจํ‚ค์ง€๋งŒ ์ถœ๋ ฅํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๊ฒฝ๋กœ๋ฅผ ์ง€์ •ํ•œ๋‹ค.

yum provides '/etc/http*/httpd.conf'
ย 
httpd-2.2.15-28.el6.centos.x86_64 : Apache HTTP Server
Repo        : updates
Matched from:
Filename    : /etc/httpd/conf/httpd.conf


localinstall

yum repository ๋ฅผ ์ œ๊ณตํ•˜์ง€ ์•Š๊ณ  rpm ์œผ๋กœ๋งŒ ์ œ๊ณตํ•˜๋Š” ํŒจํ‚ค์ง€๊ฐ€ ์žˆ์„ ๊ฒฝ์šฐ (Ex: MySQL) ์œ ์šฉํ•œ ๋ช…๋ น์–ด๋‹ค.

rpm ์„ ๋กœ์ปฌ์— ๋‹ค์šด๋กœ๋“œํ•˜๊ณ  yum localinstall ๋กœ ์„ค์น˜ํ•˜๋ฉด ๋œ๋‹ค.

rpm -ivh ๋กœ ์„ค์น˜ํ•  ์ˆ˜๋„ ์žˆ์ง€๋งŒ yum ย ์œผ๋กœ ์ž‘์—…ํ•˜๋ฉด transaction ๊ธฐ๋ก์ด ๋‚จ์œผ๋ฏ€๋กœ yum history ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ rollback ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

rpm ์ œ์ž‘์‚ฌ์˜ ์„œ๋ช…์ด ์—†์–ด์„œ ์—๋Ÿฌ๊ฐ€ ๋‚ ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ --nogpgcheck ์˜ต์…˜์„ ์ถ”๊ฐ€ํ•ด์•ผ ํ•  ๊ฒฝ์šฐ๋„ ์žˆ๋‹ค.

yum plugin

yum ์€ plugin ์œผ๋กœ ๊ธฐ๋Šฅ์„ ํ™•์žฅํ•  ์ˆ˜ ์žˆ๋‹ค. ์‚ฌ์šฉ๊ฐ€๋Šฅํ•œ ์ „์ฒด ํ”Œ๋Ÿฌ๊ทธ์ธ ๋ชฉ๋ก์€ "yum search yum-plugin" ๋ช…๋ น์–ด๋กœ ๋ณผ์ˆ˜ ์žˆ๋‹ค.

yum ์„ ์‹คํ–‰ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ˜„์žฌ ๊ธฐ๋™๋œ plugin ๋ชฉ๋ก์„ ํ‘œ์‹œํ•œ๋‹ค.

Loaded plugins: fastestmirror, presto, refresh-packagekit


์œ ์šฉํ•œ ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

yum download only plugin

yum package ๋ฅผ ์„ค์น˜ํ•˜์ง€ ์•Š๊ณ  rpm ์„ ๋‹ค์šด๋กœ๋“œ๋งŒ ํ•ด์ฃผ๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์ด๋‹ค.

plugin ์„ค์น˜๋Š” ๋‹ค์Œ yum ๋ช…๋ น์œผ๋กœ ์„ค์น˜ํ•˜์ž.

yum install yum-downloadonly


download ์‹œ์—๋Š” --downloadonly ์˜ต์…˜์„ ๋ถ™์—ฌ์„œ yum ์„ ์‹คํ–‰ํ•˜๋ฉด ๋œ๋‹ค.


yum install postfix -y --downloadonly ย 

CentOS 7 ์—์„œ๋Š” yumdownloader ๋ผ๋Š” ๋ณ„๋„์˜ ๋ช…๋ น์–ด๋กœ ๋ถ„๋ฆฌ๋˜์—ˆ์Šต๋‹ˆ๋‹ค

$ yumdownloader python --source


/var/cache/yum/ ์— ๋‹ค์šด๋กœ๋“œ ํŒจํ‚ค์ง€ ์ €์žฅ๋˜๋‹ˆ ์•„๋ž˜์ฒ˜๋Ÿผ ํ•˜๋ฉด ๋จ

yum installย postfixย -y --downloadonly --downloaddir=/opt
์ฐธ๊ณ 


verify plugin

์„ค์น˜๋œ ํŒจํ‚ค์ง€๋ฅผ ๊ฒ€์ฆํ•ด ์ฃผ๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์ด๋‹ค.

๋‹ค์Œ ๋ช…๋ น์–ด๋กœ httpd ํŒจํ‚ค์ง€๋ฅผ ๊ฒ€์ฆํ•  ์ˆ˜ ์žˆ๋‹ค.

yum verify httpd


httpd ํŒจํ‚ค์ง€์˜ ์„ค์ •ํŒŒ์ผ์˜ ์ˆ˜์ • ์—ฌ๋ถ€๋ฅผ ๊ฒ€์ฆํ•˜๋ ค๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ˆ˜ํ–‰ํ•œ๋‹ค.

yum verify --verify-filenames='/etc/httpd/*'ย ย --verify-configuration-files=yes

ํŠน์ • ํ”Œ๋Ÿฌ๊ทธ์ธ disable

yum ์‹คํ–‰์‹œ --disableplugin ์˜ต์…˜์œผ๋กœ ํŠน์ • ํ”Œ๋Ÿฌ๊ทธ์ธ์˜ ์‚ฌ์šฉ์„ ์ž ์‹œ ์ค‘์ง€ํ•  ์ˆ˜ ์žˆ๋‹ค. RHEL ์˜ ๊ฒฝ์šฐ ๋„คํŠธ์›์ด ๋ฏธ๊ตฌ์„ฑ๋˜์—ˆ๊ฑฐ๋‚˜ ์•„์ง subscription ์„ ๋“ฑ๋ก ์•ˆ ํ–ˆ์„ ๊ฒฝ์šฐ yum ์‹คํ–‰์‹œ RHN(RedHat Network) ์— ์—ฐ๊ฒฐํ•˜๋ ค๊ณ  ํ•˜๋ฏ€๋กœ DVD ๋‚˜ ISO ๋กœ local repository ๋ฅผ ๋งŒ๋“ค์–ด๋„ ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ• ์ˆ˜ ์—†๋‹ค. ์ด๋Ÿด ๊ฒฝ์šฐ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋‘ ๊ฐœ์˜ plugin ์„ ์ž ์‹œ ์ค‘์ง€์‹œ์ผœ์ฃผ๋ฉด RHN ์—ฐ๊ฒฐ๊ณผ ์ƒ๊ด€์—†์ด ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋‹ค.

yum --disableplugin=subscription-manager,rhnplugin install git -y


yum ์„ค์น˜ history ๋ฐ transaction ๊ด€๋ฆฌ

ํŒจํ‚ค์ง€ ์„ค์น˜, ๋ณ€๊ฒฝ, ์‚ญ์ œ๋กœ ์ธํ•ด ๋‚ด๋ถ€ ์ €์žฅ์†Œ๊ฐ€ ๋ณ€๊ฒฝ๋˜๋Š” ์ž‘์—…์„ ํŠธ๋žœ์žญ์…˜์ด๋ผ๊ณ  ํ•˜๋ฉฐ RHEL6/CentOS 6 ์— ํฌํ•จ๋œ yum ๋ถ€ํ„ฐ๋Š” ํŠธ๋žœ์žญ์…˜ ๋‚ด์—ญ์„ ํ™•์ธํ•˜๊ณ  rollback ์„ ํ•  ์ˆ˜ ์žˆ๋‹ค.ย 

ํŠธ๋žœ์žญ์…˜ ๋ชฉ๋ก ๋ณด๊ธฐ

yum history ๋ฅผ ์˜ต์…˜์—†์ด ์‹คํ–‰ํ•˜๊ฑฐ๋‚˜ ์˜ต์…˜์— list ๋ฅผ ์ฃผ๋ฉด ์ตœ๊ทผ ํŠธ๋žœ์žญ์…˜ ๋ชฉ๋ก์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

root@localhost:~:> yum history list
ย 

Loaded plugins: fastestmirror, security
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
     8 | root <root>              | 2014-01-08 05:51 | Install        |    1   
     7 | root <root>              | 2014-01-08 04:23 | Reinstall      |    1   
     6 | root <root>              | 2014-01-08 03:18 | Reinstall      |    1   
     5 | root <root>              | 2014-01-07 06:44 | I, U           |    4   
     4 | root <root>              | 2014-01-02 05:32 | I, U           |    3   
     3 | root <root>              | 2014-01-01 03:48 | Install        |    4 EE
     2 | root <root>              | 2014-01-01 03:15 | I, U           |   28   
     1 | System <unset>           | 2013-12-15 03:43 | Install        |  534 


๋ชจ๋“  ํŠธ๋žœ์žญ์…˜์„ ๋ณด๋ ค๋ฉด list ์˜ต์…˜๋’ค์— all ๋’ค์— ํ‚ค์›Œ๋“œ๋ฅผ ์ฃผ๋ฉด ๋œ๋‹ค.

root@localhost:~:> yum history list all


ํŠน์ • ๋ฒ”์œ„๋‚ด ํŠธ๋žœ์žญ์…˜๋งŒ ๋ณด๋ ค๋ฉด "์‹œ์ž‘ ํŠธ๋žœ์žญ์…˜ ๋ฒˆํ˜ธ".."์ข…๋ฃŒ ํŠธ๋žœ์žญ์…˜ ๋ฒˆํ˜ธ" ํ˜•์‹์œผ๋กœ ์ž…๋ ฅํ•˜๋ฉด ๋œ๋‹ค. ๋‹ค์Œ์€ ํŠธ๋žœ์žญ์…˜ ๋ฒˆํ˜ธ๊ฐ€ 30 ์—์„œ 35์ธ ๋ชฉ๋ก์„ ์ถœ๋ ฅํ•œ๋‹ค.

yum history list 30..35
Loaded plugins: fastestmirror, replace
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
    35 | root <root>              | 2014-01-12 16:53 | I, U           |    3 EE
    34 | root <root>              | 2014-01-12 14:05 | Install        |    1   
    33 | root <root>              | 2014-01-12 14:05 | Erase          |    2   
    32 | root <root>              | 2014-01-12 13:00 | Install        |    2   
    31 | root <root>              | 2014-01-12 13:00 | Erase          |    1   
    30 | root <root>              | 2014-01-02 10:18 | Install        |    5   
history list


ํŠธ๋žœ์žญ์…˜์—์„œ ์ •๋ณด ์ถ”์ถœ

๋งˆ์ง€๋ง‰ ํŠธ๋žœ์žญ์…˜ ์ •๋ณด ๋ณด๊ธฐ

root@localhost:~:> yum history info

Loaded plugins: fastestmirror, security
Transaction ID : 8
Begin time     : Wed Jan  8 05:51:29 2014
Begin rpmdb    : 541:b7c34882afac2a58081bb274b5aaf30c2f993335
End time       :            05:51:31 2014 (2 seconds)
End rpmdb      : 542:4124c5c718def4131929c4ca08df78611232aa42
User           : root <root>
Return-Code    : Success
Command Line   : install mc
Transaction performed with:
    Installed     rpm-4.8.0-37.el6.x86_64                       @anaconda-CentOS-201311272149.x86_64/6.5
    Installed     yum-3.2.29-43.el6.centos.noarch               @updates
    Installed     yum-plugin-fastestmirror-1.1.30-14.el6.noarch @anaconda-CentOS-201311272149.x86_64/6.5
Packages Altered:
    Install mc-1:4.7.0.2-3.el6.x86_64 @base
history info


ID ๊ฐ€ 4 ์ธ ํŠธ๋žœ์žญ์…˜ ์ •๋ณด ๋ณด๊ธฐ

root@localhost:~:> yum history info 4

Loaded plugins: fastestmirror, security
Transaction ID : 4
Begin time     : Thu Jan  2 05:32:21 2014
Begin rpmdb    : 539:85ca42f3d13cc18b6c4e179d32d564ba2ad47345
End time       :            05:32:30 2014 (9 seconds)
End rpmdb      : 540:a28a774308ff5f83227157e08f47bb2b3aa02618
User           : root <root>
Return-Code    : Success
Command Line   : localinstall git-1.8.3.1-1.sdl6.x86_64.rpm perl-Git-1.8.3.1-1.sdl6.noarch.rpm
Transaction performed with:
    Installed     rpm-4.8.0-37.el6.x86_64                       @anaconda-CentOS-201311272149.x86_64/6.5
    Installed     yum-3.2.29-43.el6.centos.noarch               @updates
    Installed     yum-plugin-fastestmirror-1.1.30-14.el6.noarch @anaconda-CentOS-201311272149.x86_64/6.5
Packages Altered:
    Updated     git-1.7.1-3.el6_4.1.x86_64          @anaconda-CentOS-201311272149.x86_64/6.5
    Update          1.8.3.1-1.sdl6.x86_64           @/git-1.8.3.1-1.sdl6.x86_64
    Updated     perl-Git-1.7.1-3.el6_4.1.noarch     @anaconda-CentOS-201311272149.x86_64/6.5
    Update               1.8.3.1-1.sdl6.noarch      @/perl-Git-1.8.3.1-1.sdl6.noarch
    Dep-Install perl-TermReadKey-2.30-13.el6.x86_64 @base
history info


ํŠธ๋žœ์žญ์…˜ ๋˜๋Œ๋ฆฌ๊ธฐ

yum history undo ID ๋ช…๋ น์–ด๋กœ ํŠน์ • ํŠธ๋žœ์žญ์…˜์„ ๋˜๋Œ๋ฆด ์ˆ˜ ์žˆ๋‹ค. (ID๋Š” ํŠธ๋žœ์žญ์…˜ ๋ฒˆํ˜ธ์ด๋‹ค)

์˜ˆ๋กœ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํŠธ๋žœ์žญ์…˜ 8์—์„œ mc ๋ผ๋Š” ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ–ˆ์„ ๊ฒฝ์šฐ

root@localhost:~:> yum history list

Loaded plugins: fastestmirror, security
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
     8 | root <root>              | 2014-01-08 05:51 | Install        |    1   
     7 | root <root>              | 2014-01-08 04:23 | Reinstall      |    1   
     6 | root <root>              | 2014-01-08 03:18 | Reinstall      |    1   
     5 | root <root>              | 2014-01-07 06:44 | I, U           |    4   
     4 | root <root>              | 2014-01-02 05:32 | I, U           |    3   
     3 | root <root>              | 2014-01-01 03:48 | Install        |    4 EE
     2 | root <root>              | 2014-01-01 03:15 | I, U           |   28   
     1 | System <unset>           | 2013-12-15 03:43 | Install        |  534   
history list

yum history undo 8 ์„ ์‹คํ–‰ํ•˜๋ฉด 8๋ฒˆ ํŠธ๋žœ์žญ์…˜์— ๋Œ€ํ•ด undo ๋ฅผ ์ˆ˜ํ–‰ํ•œ๋‹ค. undoย ์˜ ๊ฒฐ๊ณผ๋Š” ํ•ด๋‹น ํŠธ๋žœ์žญ์…˜์ด ๋ฌด์—‡์ด์—ˆ๋Š”์ง€์— ๋”ฐ๋ผ ๋‹ค๋ฅด๋‹ค. ์„ค์น˜์˜€์œผ๋ฉด undo ๋Š” ์‚ญ์ œ๊ฐ€ ๋˜๊ณ  ์‚ญ์ œ์˜€๋‹ค๋ฉด undo ๋Š” ์„ค์น˜๊ฐ€ ๋œ๋‹ค.

์˜ˆ๋กœ ํŠธ๋žœ์žญ์…˜ 8๋ฒˆ์—์„œ mc ๋ผ๋Š” ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ–ˆ์œผ๋ฉด undo 8์˜ ๊ฒฐ๊ณผ๋Š” mc ํŒจํ‚ค์ง€์˜ ์‚ญ์ œ๊ฐ€ ๋œ๋‹ค

transaction 8 ๋ฒˆ ๋˜๋Œ๋ฆฌ๊ธฐ
root@localhost:~:> ย yum history undo 8

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: data.nicehosting.co.kr
 * extras: data.nicehosting.co.kr
 * updates: data.nicehosting.co.kr
Undoing transaction 8, from Wed Jan  8 05:51:29 2014
    Install mc-1:4.7.0.2-3.el6.x86_64 @base
Resolving Dependencies
--> Running transaction check
---> Package mc.x86_64 1:4.7.0.2-3.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================
 Package              Arch                     Version                             Repository               Size
=================================================================================================================
Removing:
 mc                   x86_64                   1:4.7.0.2-3.el6                     @base                   5.4 M
Transaction Summary
=================================================================================================================
Remove        1 Package(s)
Installed size: 5.4 M
Is this ok [y/N]: y


undo์˜ ๊ฒฐ๊ณผ๋กœ ๋‹ค์Œ๊ณผ ๊ฐ™์ด transaction 9๋ฒˆ์ด ์ƒ๊ฒผ๊ณ  Action ์€ Erase ๊ฐ€ ๋œ๋‹ค.

root@localhost:~:> yum history list ย 

Loaded plugins: fastestmirror, security
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
     9 | root <root>              | 2014-01-08 05:58 | Erase          |    1   
     8 | root <root>              | 2014-01-08 05:51 | Install        |    1   
     7 | root <root>              | 2014-01-08 04:23 | Reinstall      |    1   
     6 | root <root>              | 2014-01-08 03:18 | Reinstall      |    1   
     5 | root <root>              | 2014-01-07 06:44 | I, U           |    4   
     4 | root <root>              | 2014-01-02 05:32 | I, U           |    3   
     3 | root <root>              | 2014-01-01 03:48 | Install        |    4 EE
     2 | root <root>              | 2014-01-01 03:15 | I, U           |   28   
     1 | System <unset>           | 2013-12-15 03:43 | Install        |  534   
history list


๋ชจ๋“  history ๋ฅผ ์‚ญ์ œํ•˜๋Š” ์œ„ํ—˜ํ•œ ๋ช…๋ น์–ด์ด๋‹ค. ํŠน๋ณ„ํ•œ ์ด์œ ๊ฐ€ ์—†๋‹ค๋ฉด ์‹คํ–‰ํ•˜์ง€ ์•Š๋Š”๋‹ค.

yum history new


๊ฐ™์ด ๋ณด๊ธฐ

์ฐธ๊ณ