관리 메뉴

드럼치는 프로그래머

[Linux] yum 설치 및 사용법 본문

★─Programing/☆─Linux

[Linux] yum 설치 및 사용법

드럼치는한동이 2007. 8. 6. 17:42
■ YUM 설치
  
 [root@www ~]#rpm -Uvh yum-2.0.8-1.noarch.rpm
 
■ YUM 사용법
 
  1) yum list
    <!--StartFragment--> →전체 패키지를 출력할때 사용한다.
        일반적으로 리스트중 업데이트가능한 항목은 updates 
        업데이트 할 항목이 없는경우 base 라고 출력된다.
        
[root@linux230 root]# yum list
Gathering header information file(s) from server(s)
Server: Red Hat Linux 3ES - i386 - Base
Server: Red Hat Linux 3ES - Updates
Finding updated packages
Downloading needed headers
cpio-0-2.5-3e.3.i386.hdr 100% |=========================| 3.1 kB 00:06
net-tools-0-1.60-20E.7.i3 100% |=========================| 5.5 kB 00:03
bzip2-0-1.0.2-11.EL3.4.i3 100% |=========================| 3.6 kB 00:06
                               ․
                               ․
                               ․
cups-libs-1-1.1.17-13.3.2 100% |=========================| 6.0 kB 00:06
vim-minimal-1-6.3.046-0.3 100% |=========================| 2.4 kB 00:03
libuser-0-0.51.7-1.EL3.3. 100% |=========================| 8.3 kB 00:06

vte                                               i386     0.11.10-11          updates
vte-devel                                     i386     0.11.10-11          updates
w3c-libwww                                i386     5.4.0-5               base
w3c-libwww-apps                       i386     5.4.0-5               base
xsane-gimp                                  i386     0.89-3                base
                  ․
                  ․
                  ․
xscreensaver                                i386     1:4.10-8.WB1     updates
yp-tools                                        i386     2.8-6                 updates
ypbind                                           i386     3:1.12-5.21.6     updates
ypserv                                           i386     2.8-13               updates
zip                                                 i386     2.3-16.1            updates
zlib-devel                                      i386     1.1.4-8.1           base

  2) yum update [package]
     →<!--StartFragment--> 뒤에 패키지를 지정하지 않고 yum update를 실행하면
          업데이트가능한 항목들과 새로 설치될 항목들의 리스트(헤더파일)만 다운 받고
          설치할것인지 물어보며
          Y  를 누르면 모든 항목을 자동 설치한다( 의존성검사하여 필요한 화일까지 같이 설치)
<!--StartFragment--> 
[root@linux236 src]# yum update
Gathering header information file(s) from server(s)
Server: Red Hat Linux 4ES - i386 - Base
Server: Red Hat Linux 4ES - Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
.Dependencies resolved
I will do the following:
[install: kernel 2.6.9-5.0.5.EL.i686]
[install: kernel-smp 2.6.9-5.0.5.EL.i686]
[update: libaio-devel 0.3.103-3.i386]
[update: postgresql-docs 7.4.7-2.RHEL4.1.i386]
[update: php-mysql 4.3.9-3.6.i386]
               ․
               ․
               ․
               ․
[update: php-mbstring 4.3.9-3.6.i386]
[update: krb5-devel 1.3.4-12.i386]
[update: xorg-x11-devel 6.8.1-23.EL.WB1.i386]
[update: libtiff 3.6.1-8.i386]
[update: postgresql-python 7.4.7-2.RHEL4.1.i386]
I will install/upgrade these to satisfy the dependencies:
[deps: httpd 2.0.52-9.ent.WB1.i386]
[deps: mysql 4.1.10a-1.RHEL4.1.i386]
[deps: whitebox-logos 1.1.25-1.WB1.noarch]
Is this ok [y/N]: y
Downloading Packages
Getting postgresql-docs-7.4.7-2.RHEL4.1.i386.rpm
postgresql-docs-7.4.7-2.R 100% |=========================| 1.1 MB 03:42
Getting php-mysql-4.3.9-3.6.i386.rpm
php-mysql-4.3.9-3.6.i386. 100% |=========================| 33 kB 00:23
Getting exim-doc-4.43-1.RHEL4.3.i386.rpm
exim-doc-4.43-1.RHEL4.3.i 1% | | 48 kB 25:36 ETA
 
<!--StartFragment-->
[root@linux236 ~]# yum update telnet       // telnet만 업데이트하여 설치할경우
Gathering header information file(s) from server(s)
Server: Red Hat Linux 4ES - i386 - Base
Server: Red Hat Linux 4ES - Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
Dependencies resolved
I will do the following:
[update: telnet 1:0.17-31.EL4.2.i386]
Is this ok [y/N]: y
Downloading Packages
Getting telnet-0.17-31.EL4.2.i386.rpm
telnet-0.17-31.EL4.2.i386 100% |=========================| 52 kB 00:19
Running test transaction:
Test transaction complete, Success!
telnet 100 % done 1/2
Completing update for telnet - 2/2
Updated: telnet 1:0.17-31.EL4.2.i386
Transaction(s) Complete
 
  3) yum remove [package]
     → 패키지를 삭제 하고자할경우 remove 를 통해 삭제시킬수 있다.
 
[root@linux230 yum]# yum remove telnet        //telnet 을 지우고자할경우
Gathering header information file(s) from server(s)
Server: Red Hat Linux 3ES - i386 - Base
Server: Red Hat Linux 3ES - Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
Dependencies resolved
I will do the following:
[erase: telnet 1:0.17-26.i386]
Is this ok [y/N]: y
Downloading Packages
Running test transaction:
Test transaction complete, Success!
Erasing: telnet 1/1
Erased: telnet 1:0.17-26.i386
Transaction(s) Complete
 4) yum install [package]
   → 설치되어있지않은 새패키지의 경우 install 을 사용하여 설치한다.
       의존성에 걸린 화일들까지 찾아서 자동으로 같이 설치해준다.
 
<!--StartFragment-->
[root@linux230 yum]# yum install telnet                //telnet 을 새로 설치할경우
Gathering header information file(s) from server(s)
Server: Red Hat Linux 3ES - i386 - Base
Server: Red Hat Linux 3ES - Updates
Finding updated packages
Downloading needed headers
telnet-1-0.17-26.i386.hdr 100% |=========================| 3.0 kB 00:00
Resolving dependencies
Dependencies resolved
I will do the following:
[install: telnet 1:0.17-26.i386]
Is this ok [y/N]: y
Downloading Packages
Getting telnet-0.17-26.i386.rpm
telnet-0.17-26.i386.rpm 100% |=========================| 47 kB 00:00
Running test transaction:
Test transaction complete, Success!
telnet 100 % done 1/1
Installed: telnet 1:0.17-26.i386
Transaction(s) Complete
 
■ YUM 로그확인
 
  [root@www root]#cat /var/log/yum.log
     9?? 14 11:07:23 Installed: telnet-server 1:0.17-26.i386
9?? 14 11:09:07 Installed: caching-nameserver 7.2-7.noarch
9?? 14 11:20:05 Installed: vsftpd 1.2.0-4.i386
9?? 14 15:11:50 Erased: telnet 1:0.17-26.i386
9?? 14 15:12:12 Installed: telnet 1:0.17-26.i386
9?? 15 09:56:35 Installed: cvs 1.11.2-10.i386
9?? 15 09:57:45 Installed: dhcp 1:3.0pl2-6.14.i386
9?? 15 14:05:32 Updated: ntp 4.1.2-4.EL3.1.i386
9?? 15 14:07:14 Erased: ntp 4.1.2-4.EL3.1.i386
9?? 15 14:07:14 Erased: firstboot 1.1.19-1.noarch
Comments