YUM을 이용한 패키지 설치 및 삭제
YUM을 이용해서 YUM을 업데이트 해보자.
# rpm -qa | grep yum
yum-metadata-parser-1.1.2-2.el5
yum-updatesd-0.9-2.el5
yum-3.2.8-9.el5.centos.1
# ps aux | grep yum
root 20308 0.0 0.9 25704 9844 pts/2 SN 13:15 0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
root 20347 0.0 0.0 5184 752 pts/2 S+ 13:17 0:00 grep yum
- YUM이 설치되어 있는 지 확인한다.
# /etc/rc.d/init.d/yum-updatesd stop
yum-updatesd를 정지 중: [ OK ]
# /etc/rc.d/init.d/yum-updatesd start
yum-updatesd를 시작 중: [ OK ]
# /etc/rc.d/init.d/yum-updatesd status
yum-updatesd (pid 20366)를 실행 중...
- YUM은 Standalone Daemon 서비스 이기 때문에 작동을 시켜준다.
# yum update yum.noarch
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package yum.noarch 0:3.2.8-9.el5.centos.2.1 set to be updated
--> Processing Dependency: yum-fastestmirror for package: yum
--> Running transaction check
---> Package yum-fastestmirror.noarch 0:1.1.10-9.el5.centos set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
yum noarch 3.2.8-9.el5.centos.2.1 updates 582 k
Installing for dependencies:
yum-fastestmirror noarch 1.1.10-9.el5.centos base 13 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 595 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : yum ######################### [1/3]
Installing: yum-fastestmirror ######################### [2/3]
Cleanup : yum ######################### [3/3]
Dependency Installed: yum-fastestmirror.noarch 0:1.1.10-9.el5.centos
Updated: yum.noarch 0:3.2.8-9.el5.centos.2.1
Complete!
- YUM을 업데이트 한다.
# rpm -qa | grep yum
yum-fastestmirror-1.1.10-9.el5.centos
yum-metadata-parser-1.1.2-2.el5
yum-updatesd-0.9-2.el5
yum-3.2.8-9.el5.centos.2.1
- YUM이 제대로 업데이트가 되었는지 확인한다.
------------------------------------------------------------------------------------------------------------------------
YUM 을 이용한 설치
YUM을 이용하여 telnet-server를 설치해 보자.
# yum install telnet-server
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* updates: ftp2.tnc.edu.tw
* addons: ftp.cs.pu.edu.tw
* extras: ftp.chu.edu.tw
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package telnet-server.i386 1:0.17-39.el5 set to be updated
-->치 Processing Dependency: xinetd for package: telnet-server
--> Running transaction check
---> Package xinetd.i386 2:2.3.14-10.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
telnet-server i386 1:0.17-39.el5 base 35 k
Installing for dependencies:
xinetd i386 2:2.3.14-10.el5 base 124 k
Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 159 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): xinetd-2.3.14-10.e 100% |=========================| 124 kB 00:01
(2/2): telnet-server-0.17 100% |=========================| 35 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: xinetd ######################### [1/2]
Installing: telnet-server ######################### [2/2]
Installed: telnet-server.i386 1:0.17-39.el5
Dependency Installed: xinetd.i386 2:2.3.14-10.el5
Complete!
------------------------------------------------------------------------------------------------------------------------
일반 삭제
telnet-server가 설치되어 있는 상태에서 xinetd를 삭제해 보자.
# rpm -e xinetd
오류 : Failed dependencies:
xinetd is needed by (installed) telnet-server-0.14-39-el5.i386
- xinetd를 삭제하려고 하면 의존성때문에 삭제가 되지 않는다.
# rpm -e telnet-server
경고: /etc/xinetd.d/telnet(이)가 /etc/xinetd.d/telnet.rpmsave(으)로 저장되었습니다
# rpm -e xinetd
- telnet-server를 삭제하고 xinetd를 삭제하면 의존성이 해결되어 바로 삭제가 된다.
# yum remove xinetd
Loading "fastestmirror" plugin
Setting up Remove Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* updates: ftp2.tnc.edu.tw
* addons: ftp.cs.pu.edu.tw
* extras: ftp.chu.edu.tw
No Match for argument: xinetd
No Packages marked for removal
- 일반적으로 telnet-server가 설치되어 있는 상태에서 xinetd를 삭제할 경우 의존성에 의해 telnet-server를 먼저 지워야 한다. telnet-server를 삭제한 후 xinetd을 삭제하면 의존성이 해결되어 깨끗이 지워진다.
yum remove를 이용해 확인해 보면 삭제할 패키지가 없다고 나온다.
------------------------------------------------------------------------------------------------------------------------
YUM을 이용한 삭제
YUM을 이용하여 xinetd를 삭제해 보자.
# yum remove xinetd
Loading "fastestmirror" plugin
Setting up Remove Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* updates: ftp2.tnc.edu.tw
* addons: ftp.cs.pu.edu.tw
* extras: ftp.chu.edu.tw
Resolving Dependencies
--> Running transaction check
---> Package xinetd.i386 2:2.3.14-10.el5 set to be erased
--> Processing Dependency: xinetd for package: telnet-server
--> Running transaction check
---> Package telnet-server.i386 1:0.17-39.el5 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Removing:
xinetd i386 2:2.3.14-10.el5 installed 256 k
Removing for dependencies:
telnet-server i386 1:0.17-39.el5 installed 49 k
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 0 Package(s)
Remove 2 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : telnet-server ######################### [1/2]
Erasing : xinetd ######################### [2/2]
Removed: xinetd.i386 2:2.3.14-10.el5
Dependency Removed: telnet-server.i386 1:0.17-39.el5
Complete!
- YUM을 이용해 삭제를 할 경우 의존성과 관련된 패키지들을 같이 삭제하므로 바로 삭제가 가능하다.
YUM을 이용해서 YUM을 업데이트 해보자.
# rpm -qa | grep yum
yum-metadata-parser-1.1.2-2.el5
yum-updatesd-0.9-2.el5
yum-3.2.8-9.el5.centos.1
# ps aux | grep yum
root 20308 0.0 0.9 25704 9844 pts/2 SN 13:15 0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
root 20347 0.0 0.0 5184 752 pts/2 S+ 13:17 0:00 grep yum
- YUM이 설치되어 있는 지 확인한다.
# /etc/rc.d/init.d/yum-updatesd stop
yum-updatesd를 정지 중: [ OK ]
# /etc/rc.d/init.d/yum-updatesd start
yum-updatesd를 시작 중: [ OK ]
# /etc/rc.d/init.d/yum-updatesd status
yum-updatesd (pid 20366)를 실행 중...
- YUM은 Standalone Daemon 서비스 이기 때문에 작동을 시켜준다.
# yum update yum.noarch
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package yum.noarch 0:3.2.8-9.el5.centos.2.1 set to be updated
--> Processing Dependency: yum-fastestmirror for package: yum
--> Running transaction check
---> Package yum-fastestmirror.noarch 0:1.1.10-9.el5.centos set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
yum noarch 3.2.8-9.el5.centos.2.1 updates 582 k
Installing for dependencies:
yum-fastestmirror noarch 1.1.10-9.el5.centos base 13 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 595 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : yum ######################### [1/3]
Installing: yum-fastestmirror ######################### [2/3]
Cleanup : yum ######################### [3/3]
Dependency Installed: yum-fastestmirror.noarch 0:1.1.10-9.el5.centos
Updated: yum.noarch 0:3.2.8-9.el5.centos.2.1
Complete!
- YUM을 업데이트 한다.
# rpm -qa | grep yum
yum-fastestmirror-1.1.10-9.el5.centos
yum-metadata-parser-1.1.2-2.el5
yum-updatesd-0.9-2.el5
yum-3.2.8-9.el5.centos.2.1
- YUM이 제대로 업데이트가 되었는지 확인한다.
------------------------------------------------------------------------------------------------------------------------
YUM 을 이용한 설치
YUM을 이용하여 telnet-server를 설치해 보자.
# yum install telnet-server
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* updates: ftp2.tnc.edu.tw
* addons: ftp.cs.pu.edu.tw
* extras: ftp.chu.edu.tw
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package telnet-server.i386 1:0.17-39.el5 set to be updated
-->치 Processing Dependency: xinetd for package: telnet-server
--> Running transaction check
---> Package xinetd.i386 2:2.3.14-10.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
telnet-server i386 1:0.17-39.el5 base 35 k
Installing for dependencies:
xinetd i386 2:2.3.14-10.el5 base 124 k
Transaction Summary
=============================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 159 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): xinetd-2.3.14-10.e 100% |=========================| 124 kB 00:01
(2/2): telnet-server-0.17 100% |=========================| 35 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: xinetd ######################### [1/2]
Installing: telnet-server ######################### [2/2]
Installed: telnet-server.i386 1:0.17-39.el5
Dependency Installed: xinetd.i386 2:2.3.14-10.el5
Complete!
------------------------------------------------------------------------------------------------------------------------
일반 삭제
telnet-server가 설치되어 있는 상태에서 xinetd를 삭제해 보자.
# rpm -e xinetd
오류 : Failed dependencies:
xinetd is needed by (installed) telnet-server-0.14-39-el5.i386
- xinetd를 삭제하려고 하면 의존성때문에 삭제가 되지 않는다.
# rpm -e telnet-server
경고: /etc/xinetd.d/telnet(이)가 /etc/xinetd.d/telnet.rpmsave(으)로 저장되었습니다
# rpm -e xinetd
- telnet-server를 삭제하고 xinetd를 삭제하면 의존성이 해결되어 바로 삭제가 된다.
# yum remove xinetd
Loading "fastestmirror" plugin
Setting up Remove Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* updates: ftp2.tnc.edu.tw
* addons: ftp.cs.pu.edu.tw
* extras: ftp.chu.edu.tw
No Match for argument: xinetd
No Packages marked for removal
- 일반적으로 telnet-server가 설치되어 있는 상태에서 xinetd를 삭제할 경우 의존성에 의해 telnet-server를 먼저 지워야 한다. telnet-server를 삭제한 후 xinetd을 삭제하면 의존성이 해결되어 깨끗이 지워진다.
yum remove를 이용해 확인해 보면 삭제할 패키지가 없다고 나온다.
------------------------------------------------------------------------------------------------------------------------
YUM을 이용한 삭제
YUM을 이용하여 xinetd를 삭제해 보자.
# yum remove xinetd
Loading "fastestmirror" plugin
Setting up Remove Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* updates: ftp2.tnc.edu.tw
* addons: ftp.cs.pu.edu.tw
* extras: ftp.chu.edu.tw
Resolving Dependencies
--> Running transaction check
---> Package xinetd.i386 2:2.3.14-10.el5 set to be erased
--> Processing Dependency: xinetd for package: telnet-server
--> Running transaction check
---> Package telnet-server.i386 1:0.17-39.el5 set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Removing:
xinetd i386 2:2.3.14-10.el5 installed 256 k
Removing for dependencies:
telnet-server i386 1:0.17-39.el5 installed 49 k
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 0 Package(s)
Remove 2 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : telnet-server ######################### [1/2]
Erasing : xinetd ######################### [2/2]
Removed: xinetd.i386 2:2.3.14-10.el5
Dependency Removed: telnet-server.i386 1:0.17-39.el5
Complete!
- YUM을 이용해 삭제를 할 경우 의존성과 관련된 패키지들을 같이 삭제하므로 바로 삭제가 가능하다.
'Linux > Exercise' 카테고리의 다른 글
리눅스 시스템 1차 테스트 - 모범답안 (1) | 2008.11.19 |
---|---|
리눅스 시스템 1차 테스트 - 연습용 (0) | 2008.11.19 |
원격 서버에 로그 남기기 - 연습용 (0) | 2008.11.17 |
RPM 패키지 설치 및 삭제 - 연습용 (0) | 2008.11.14 |
데몬을 런레벨에 추가하기 - 소스로 설치시 (0) | 2008.11.13 |
SUID(Set User Id) - 연습용 (0) | 2008.11.12 |