■ YUM 설치
[root@www ~]#rpm -Uvh yum-2.0.8-1.noarch.rpm
■ YUM 사용법
♣ option
* install package1 [package2] [...]
→ 패키지들의 그룹 혹은 패키지의 최신버전을 설치할때 사용된다 .
* update [package1] [package2] [...]
→ 패키지이름을 지정하지 않으면 모든 패키지들의 버전을 확인하고 패키지를 지정하면
지정된 패키지들만 확인하여 업데이트할것이 있는지 찾는다.
* check-update
→ 업데이트가능한 패키지들의 목록만 보여준다.
* remove [package1] [package2] [...]
→지정된 패키지를 삭제하는데 사용되며 의존성에 걸린 패키지들까지 함께 삭제하는데 사용
* list [...]
→ 아무 옵션을 주지 않으면 base, update 패키지등으로 구분하여 패키지들을 목록을
출력하여 보여준다.
※세부옵션
→ yum list updates
//yum 저장소에 있는 업데이트가능한 항목을 모두 보여준다.
→ yum list installed
//현재 시스템에 설치된 패키지들의 항목을 모두 보여준다.
→ yum extras
// yum 저장소에 없는 패키지들이 시스템에 설치된 경우 그 패키지들을 보여준다.
* provides
→ 패키지들의 설치 경로나 화일이름 중에 일치되는 단어를 검색하는 명령으로써
일치되는부분의 절대경로를 출력해주며 설치되있는지 설치가능한지 출력해준다.
* search
→ 패키지의 설명, 패키지 이름, 작성자 등에서 일치되는 단어를 검색하는 명령으로
일치되는 부분의 설명 , 화일이름등을 출력하고 설치되있는지 가능한지 출력해준다.
* info [...]
→ 지정된 패키지들의 정보에 대해 출력해주는 명령으로써
rpm -qi 명령의 결과와 비슷한 결과이다.
뒤에 패키지이름을 지정안하는경우 yum 서버의 전체 패키지들의 설명을
출력하고 업데이트가능한지도 함께 출력해준다.
* -y
→ 패키지를 설치하거나 지울때 실행할것인지 묻지 않고 바로 설치하거나
삭제하게하는 옵션
* -h
→ 도움말 출력해주는 옵션.
* clean headers , packages , all
→ /var/cache/yum/ 디렉토리에 캐시에 저장된 내용을 삭제하는 옵션들.
headers 는 패키지를 선택하고 설치하기전 다운받는 *.hdr화일을 삭제하는 옵션
packages 는 실제패키지를 다운받아 저장해놓은 화일들을 삭제하는 옵션
all 은 headers와 packages들 모두 삭제하는 옵션
■ yum 사용예 모음
1) yum list
[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]
[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
[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]
[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]
[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
5) yum provides
[root@linux225 ~]# yum provides telnet | more
Searching Packages:
Setting up repositories
Reading repository metadata in from local files
Importing Additional filelist information for packages
perl-Net-Telnet.noarch 3.03-4 base
Matched from:
/usr/lib/perl5/vendor_perl/5.8.6/Net/Telnet.pm
/usr/share/man/man3/Net::Telnet.3pm.gz
perl(Net::Telnet) = 3.03
perl-Net-Telnet = 3.03-4
gnome-telnet.i386 2.5-5 updates
Matched from:
/usr/share/doc/gnome-telnet-2.5
/usr/bin/gnome-telnet
/usr/share/pixmaps/gtelnet_bg_brown.jpg
/usr/share/pixmaps/gnome-telnet.png
/usr/share/pixmaps/gnome-telnet.xpm
/usr/share/pixmaps/gtelnet_bg_black.jpg
/usr/share/locale/de/LC_MESSAGES/gnome-telnet.mo
/usr/share/applications/fedora-gnome-telnet.desktop
/usr/share/doc/gnome-telnet-2.5/pref_telnet.jpg
6) yum search
[root@linux225 ~]# yum search telnet | more
Searching Packages:
Setting up repositories
Reading repository metadata in from local files
screen.i386 4.0.2-9 base
Matched from:
The screen utility allows you to have multiple logins on just one
terminal. Screen is useful for users who telnet into a machine or are
connected via a dumb terminal, but want to use more than just one
login.
Install the screen package if you need a screen manager that can
support multiple logins on one terminal.
tcp_wrappers.i386 7.6-39 base
Matched from:
The tcp_wrappers package provides small daemon programs which can
monitor and filter incoming requests for systat, finger, FTP, telnet,
rlogin, rsh, exec, tftp, talk and other network services.
Install the tcp_wrappers program if you need a security tool for
filtering incoming network services requests.
This version also supports IPv6.
gnome-telnet.i386 2.5-5 updates
Matched from:
gnome-telnet
Fancy GNOME telnet client
GTelnet (gnome-telnet) is a pretty, powerful, and fancy 3-in-1 GNOME1
client for telnet, ssh, and rlogin. It supports both SSH2 and OpenSSH.
7) yum clean
[root@linux225 ~]# ls /var/cache/yum/base/headers
gmp-4.1.4-6.i386.hdr → 헤더화일 존재 확인
[root@linux225 ~]# ls /var/cache/yum/base/packages
gmp-4.1.4-6.i386.rpm → 패키지화일 존재 확인
[root@linux225 ~]# yum clean headers → 헤더화일 clean 실행
Cleaning up Headers
2 headers removed
[root@linux225 ~]# ls /var/cache/yum/base/headers → 삭제 된것 확인
[root@linux225 ~]# yum clean packages → 패키지화일 clean 실행
Cleaning up Packages
2 packages removed
[root@linux225 ~]# ls /var/cache/yum/base/packages →삭제 된것 확인
[root@linux225 ~]#
■ YUM 로그확인
[root@www root]#cat /var/log/yum.log
'Linux' 카테고리의 다른 글
리눅스 fdisk 사용하기 (파티션 관리) (1) | 2008.05.07 |
---|---|
Tripwire 설치 (0) | 2008.04.25 |
리눅스 - Apache 설치하기 (2) | 2008.04.25 |
리눅스 한글 UTF-8 환경 구축 (1) | 2008.04.25 |
[vsftp] root 계정으로 ftp 접속 방법 (0) | 2008.04.25 |