linux class(new) 1 페이지

본문 바로가기
사이트 내 전체검색


회원로그인

linux class(new)

RPM 패키지 관리

페이지 정보

작성자 admin 작성일16-02-17 17:44 조회1,613회 댓글1건

본문

rpm -Redhat Package Manager

패키지란? - 배포하기 위한 목적으로 제작된 관련있는 파일이나 프로그램의 집합
상용패키지와 프리웨어패키지(오픈소스포함)등이 있다.
패키징(제작방식) 방식에 따라서는 소스코드 패키지와 바이너리 패키지로 구분할 수 있다.

- 초기 리눅스 시스템은 어떤 프로그램을 설치하고자 하면 소스를 받아서 일일이 컴파일해야 했다.
컴파일에 대한 지식이 없는 사람에게는 매우 힘든 작업이었다.
그러다가 나중에 패키지를 쉽게 관리할수 있는 패키지 관리두도구가 개발되었다.
rpm 은 redhat 사에서 개발한 패키지 도구이며 redhat 계열의 리눅스는 rpm 패키지를 사용한다.
rpm 패키지 관리방식은 설치 후 바로 사용할 수 있는 바이너리 파일, 설치될 파일경로,
환경설정파일등을 하나의 패키지에 저장하여 rpm 이라는 명령어를 통해 패키지를
손쉽게 설치,업그레이드,질의,검증,삭제 등이 가능한 방식이다.
mswindows 에서 패키지를 관리하는 것 만큼이나 쉽다.

참고 - 소스코드 패키지 설치
바이너리 패키지와의 비교를 위해서 테스트로 소스코드 패키지를 다운로드 받아서 설치.
테스트로 설치할 소스 파일은 아파치서버 2.2.x 소스 코드
아래는 이해를 돕기 위해서 DB 연동 및 PHP 프로그램과의 관계는 고려하지 않고
아파치서버만 간략히 설치하는 것을 예로 들었다.

/usr/include# cd /tmp
/tmp# wget http://apache.tt.co.kr/httpd/httpd-2.2.31.tar.bz2
--2016-02-16 18:14:47-- http://apache.tt.co.kr/httpd/httpd-2.2.31.tar.bz2
Resolving apache.tt.co.kr... 211.47.69.77
Connecting to apache.tt.co.kr|211.47.69.77|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5610489 (5.3M) [application/x-bzip2]
Saving to: `httpd-2.2.31.tar.bz2'
100%[===========================================================================>] 5,610,489 3.43M/s in 1.6s

2016-02-16 18:14:49 (3.43 MB/s) - `httpd-2.2.31.tar.bz2' saved [5610489/5610489]









* 참고 - 소스코드 설치 -------------------------------------------------------------------------
/usr/include# cd /tmp
/tmp# wget http://apache.tt.co.kr/httpd/httpd-2.2.31.tar.bz2
--2016-02-16 18:14:47-- http://apache.tt.co.kr/httpd/httpd-2.2.31.tar.bz2
Resolving apache.tt.co.kr... 211.47.69.77
Connecting to apache.tt.co.kr|211.47.69.77|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5610489 (5.3M) [application/x-bzip2]
Saving to: `httpd-2.2.31.tar.bz2'

100%[===========================================================================>] 5,610,489 3.43M/s in 1.6s

2016-02-16 18:14:49 (3.43 MB/s) - `httpd-2.2.31.tar.bz2' saved [5610489/5610489]
/tmp#

파일전송이 완료 됨. 이제 압축을 풀고 소스코드 파일리스트 확인후 설치하면 된다.

/tmp# tar -xf httpd-2.2.31.tar.bz2
/tmp# cd httpd-2.2.31
/tmp/httpd-2.2.31# find . -name httpd
/tmp/httpd-2.2.31# find . -name *.c | head -n 5
./modules/aaa/mod_auth_basic.c
./modules/aaa/mod_authnz_ldap.c
./modules/aaa/mod_authz_owner.c
./modules/aaa/mod_authz_groupfile.c
./modules/aaa/mod_authz_user.c
.....

- 소스코드 패키지이므로 아파치서버 실행데몬 파일은 없다.
대신에 소스 파일이 있다. 이 소스파일을 컴파일하여 아파치 실행 파일이 생성되도록 해야한다.


/tmp/httpd-2.2.31# ./configure --prefix=/usr/local/apache
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for limits.h... yes
checking for unistd.h... (cached) yes
.. 이하생략

소스코드 패키지를 컴파일할때의 과정은 대부분 세가지 단계로 작업한다.
첫번째 단계 - configure 스크립트를 실행하는 과정으로 이 과정을 통해서 최적의 컴파일 환경설정을
만들기 위한 시스템 체크 및 설치될 경로를 지정한다.
-- 이 작업의 결과로 Makefile 이 생성이 되며 이 파일이 있으면 make 명령을 통해서 소스코드를
컴파일 할 수 있다.


/tmp/httpd-2.2.31# make
.....
gcc -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/tmp/httpd-2.2.31/srclib/pcre -I. -I/tmp/httpd-2.2.31/os/unix -I/tmp/httpd-2.2.31/server/mpm/prefork -I/tmp/httpd-2.2.31/modules/http -I/tmp/httpd-2.2.31/modules/filters -I/tmp/httpd-2.2.31/modules/proxy -I/tmp/httpd-2.2.31/include -I/tmp/httpd-2.2.31/modules/generators ....


두번째 단계 - Makefile 의 내용대로 소스코드를 실제로 컴파일 하는 과정이다.
소스파일의 용량에 따라서 컴파일 시간이 결정된다. 소스파일이 크면 몇시간 이상이 소요될수도 있다.
컴파일이 에러없이 끝나면

/tmp/httpd-2.2.31# find . -name httpd
./httpd
./.libs/httpd
/tmp/httpd-2.2.31#

- 바이너리 파일이 생성됨.
/.libs/httpd 파일을 실행하면 아파치 서버가 실행이 되지만 아직 한가지 단계가 남아있다.
컴파일 결과로 생성된 바이너리 파일과 환경설정 파일등을 적절한 경로로 옮겨서 이제 필요없게된
소스크드 파일과 분리하여야 한다.
(configure 스크립트 실행할때 옵션으로 준 --prefix=/usr/local/apache 가 옮겨질 디렉토리)


/tmp/httpd-2.2.31# make install

<--- 잠시 기다리면 /usr/local/apache 디렉토리가 생성이 되며 아파치 실행에 필요한 파일이
옮겨진다.

/tmp/httpd-2.2.31# cd /usr/local/apache
/usr/local/apache# ls
bin build cgi-bin conf error htdocs icons include lib logs man manual modules
/usr/local/apache

/usr/local/apache# ./bin/httpd ; 아파치 실행.
httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.10.30 for ServerName
/usr/local/apache# pgrep -fl httpd
55091 ./bin/httpd
55092 ./bin/httpd
55093 ./bin/httpd
55094 ./bin/httpd
55095 ./bin/httpd
55096 ./bin/httpd
/usr/local/apache#
*. 아파치가 실행될때 경고메시지가 하나 출력이 되었지만 실행은 되었다.
아파치의 경고메시지는 컴파일의 문제가 아니라 아파치설정 파일 httpd.conf 설정문제이다.

----------------------아파치소스파일 컴파일 참고사항 끝--------------------------------------

rpm 패키지 파일의 형태.

패키지는 설치 DVD 안에 있으므로 설치 DVD(첫번째 iso 이미지)를 마운트 한다.

/# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 15G 9.1G 5.1G 65% /
tmpfs 495M 76K 495M 1% /dev/shm
/dev/sda5 2.0G 36M 1.8G 2% /data
/dev/sda2 1008M 37M 921M 4% /home
/dev/sdc1 1004M 33M 921M 4% /bloghome
/dev/sdd1 1004M 33M 921M 4% /mnt/test
/dev/sr0 3.7G 3.7G 0 100% /media/CentOS_6.7_Final
/#




/# cd /media/CentOS_6.7_Final/
/media/CentOS_6.7_Final# ls
CentOS_BuildTag GPL RPM-GPG-KEY-CentOS-6
EFI Packages RPM-GPG-KEY-CentOS-D
EULA RELEASE-NOTES-en-US.html RPM-GPG-KEY-CentOS-S
/media/CentOS_6.7_Final# cd Packages/
/media/CentOS_6.7_Final/Packages# ls httpd*
httpd-2.2.15-45.el6.centos.x86_64.rpm
httpd-devel-2.2.15-45.el6.centos.x86_64.rpm
httpd-manual-2.2.15-45.el6.centos.noarch.rpm
httpd-tools-2.2.15-45.el6.centos.x86_64.rpm
/media/CentOS_6.7_Final/Packages#


rpm 패키지의 형태.
패키지명-패키지버전-아키텍처.rpm
ex)
httpd-2.2.15-45.el6.centos.x86_64.rpm
=> 패키지명 httpd
버전 : 2.2.15-45.el6
아키텍처: x86_64 (x86 계열 64비트 프로세서)
확장자 : rpm

아키텍처는 alpha,arm,mips,sparc,i386,i486,i586,x86_64 등 여러가지가 있다.
바이너리패키지는 cpu 타입에 종속적이다.
만약 인터넷에서 rpm 파일을 직접 다운로드 받아서 설치하는 경우에는
아키텍처를 잘 확인해야 한다. 자신이 사용하는 cpu에 맞는 아키텍처여야 한다.
i386 ~ i686 ; intel 호환 cpu, 32bit 패키지
x86_64 ; intel 호환 cpu, 64비트 패키지

rpm 주요옵션 (rpm은 매우 많은 옵션을 가지고 있다)

설치옵션(--install, -i)
rpm -i 파일명 또는 rpm --install 파일명
는 rpm -ivh 패키지명
i (install) : 설치. 이 옵션 하나만 사용해도 된다.
v (verbose) : 이 옵션을 사용하면 설치진행과정을 볼 수 있다.
h (hash mark => '#') : 진행과정을 해시마크를 찍어서 보여준다. (ftp client 명령어에 있는 hash와 같은 의미이다.)
--replacepkgs : 이미 설치되어 있는 패키지를 덮어쓰기로 설치하고자 하는 경우에 추가하는 옵션이다.

질의옵션(--query, -q)
rpm 패키지의 설치 유무를 확인하거나 패키지 정보 및 설치경로를 보고자 할때 사용

ex)

/media/CentOS_6.7_Final/Packages# rpm -q httpd
httpd-2.2.15-29.el6.centos.x86_64
/media/CentOS_6.7_Final/Packages#

*. 주의 파일명을 쓰면 안된다.

/media/CentOS_6.7_Final/Packages# rpm -q httpd-2.2.15-45.el6.centos.x86_64.rpm
httpd-2.2.15-45.el6.centos.x86_64.rpm 패키지가 설치되어 있지 않습니다
/media/CentOS_6.7_Final/Packages#


설치된 모든 rpm 패키지를 보고자 하는 경우에는
rpm --query --all 또는 rpm -qa
또는 rpm --query --all | more

설치된 패키지 중 문자열로 검색 할 경우(찾고자 하는 패키지 이름을 정확히 모를 경우)
/media/CentOS_6.7_Final/Packages# rpm -qa | grep -i telnet
perl-Net-Telnet-3.03-11.el6.noarch
telnet-0.17-47.el6_3.1.x86_64
/media/CentOS_6.7_Final/Packages#

검색 된 패키지 정보를 출력하려면

/media/CentOS_6.7_Final/Packages# rpm --query --info telnet
Name : telnet Relocations: (not relocatable)
Version : 0.17 Vendor: CentOS
Release : 47.el6_3.1 Build Date:
Install Date: Build Host: c6b10.bsys.dev.centos.org
Group : Applications/Internet Source RPM: telnet-0.17-47.el6_3.1.src.rpm
Size : 112016 License: BSD
Signature : RSA/SHA1, 2012년 09월 26일 (수) 오후 10시 16분 04초, Key ID 0946fca2c105b9de
Packager : CentOS BuildSystem
Summary : The client program for the Telnet remote login protocol
Description :
Telnet is a popular protocol for logging into remote systems over the
Internet. The package provides a command line Telnet client
/media/CentOS_6.7_Final/Packages#
/media/CentOS_6.7_Final/Packages# rpm -q --list telnet ; 설치된 패키지 목록 출력
/usr/bin/telnet
/usr/share/man/man1/telnet.1.gz
/media/CentOS_6.7_Final/Packages#

특정 파일이 어떤 패키지에 포함된것인지 출력하려면

/media/CentOS_6.7_Final/Packages# rpm -qf /bin/mkdir
coreutils-8.4-31.el6.x86_64
/media/CentOS_6.7_Final/Packages#


삭제(--erase, -e)

/media/CentOS_6.7_Final/Packages# rpm -q vsftpd
vsftpd-2.2.2-11.el6_4.1.x86_64
/media/CentOS_6.7_Final/Packages# rpm -e vsftpd
/media/CentOS_6.7_Final/Packages# rpm -q vsftpd
vsftpd 패키지가 설치되어 있지 않습니다
/media/CentOS_6.7_Final/Packages#

하지만 의존성(dependancy) 관계에 놓여 있는 패키지는 바로 삭제 되지 않는다.
/media/CentOS_6.7_Final/Packages# rpm -i telnet-server-0.17-48.el6.x86_64.rpm
/media/CentOS_6.7_Final/Packages#
/media/CentOS_6.7_Final/Packages# rpm -e xinetd
오류: Failed dependencies:
xinetd is needed by (installed) telnet-server-1:0.17-48.el6.x86_64
/media/CentOS_6.7_Final/Packages#

- telnet-server 패키지와 amanda 패키지가 xinetd 서버와 의존관계에 있으며
이런경우에는 amanda 와 telnet-server 패키지를 먼저 삭제해야 xinetd 패키지를 삭제할 수 있다.
의존성 관계를 무시하는 --nodeps 옵션을 사용하면 xinetd 패키지를 바로 삭제할수 있지만
그렇게 삭제하면 의존관계의 다른 패키지를 사용할 수 없게된다.

설치할때에도 의존성 관계에 있는 패키지가 있다면 그것을 먼저 설치해야 한다.

rpm -e telnet-server
/media/CentOS_6.7_Final/Packages# rpm -e --nodeps xinetd ; 강제로 삭제(좋은방법은 아니다)
/media/CentOS_6.7_Final/Packages# rpm -i telnet-server-0.17-48.el6.x86_64.rpm
오류: Failed dependencies:
xinetd is needed by telnet-server-1:0.17-48.el6.x86_64
/media/CentOS_6.7_Final/Packages# rpm -i xinetd-2.3.14-39.el6_4.x86_64.rpm
/media/CentOS_6.7_Final/Packages# rpm -i telnet-server-0.17-48.el6.x86_64.rpm
/media/CentOS_6.7_Final/Packages#


yum
- yum 은 rpm 을 기반으로 하는 패키지 관리도구로서 yum 은 rpm 의 불편한점인
패키지 설치 및 삭제할때의 의존성 문제를 해결해준다.
그리고 씨디롬이나 DVD롬 없이 인터넷으로 패키지를 내려받아 설치할수 있다.
yum 은 인터넷을 통하여 rpm 패키지가 저장된 저장소(repository)에서 필요한 파일을 다운로드 후
설치할 수 있다. 파일을 다운로드 받을때 참조되는 저장소의 주소는 /etc/yum.repos.d 디렉토리의
파일에 저장되어 있다.
yum 설정파일은 /etc/yum.conf

/# cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever ; 파일을 내려받고 저장하게 되는 디렉토리
keepcache=0
debuglevel=2
logfile=/var/log/yum.log ; yum 사용기록이 저장되는 파일
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=19&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release


yum 사용방법 및 주요옵션
yum [options] [command] [package ...]

yum install 패키지 [ 패키지2 패키지3 ...] => 패키지 설치
yum check-update 업데이트 가능 목록보기
yum update 패키지이름 => 패키지 업데이트
yum erase(또는 remove) 패키지이름 => 패키지 삭제
yum info 패키지이름 => 패키지 정보확인
yum update => 커널을 포함한 전체 패키지 업데이트

*. rpm package의 의존성 관련 패키지 설치 및 삭제

/# rpm -e xinetd
오류: Failed dependencies:
xinetd is needed by (installed) telnet-server-1:0.17-48.el6.x86_64

의존성 문제로 xinetd 가 삭제되지 않았다. 이런경우 telnet-server 를 먼저 삭제하고나서
xinetd 를 삭제해야 한다.
하지만 yum 인경우는

/# yum erase xinetd
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package xinetd.x86_64 2:2.3.14-39.el6_4 will be erased
--> Processing Dependency: xinetd for package: 1:telnet-server-0.17-48.el6.x86_64
--> Running transaction check
---> Package telnet-server.x86_64 1:0.17-48.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved
====================================================================================
Package Arch Version Repository Size
====================================================================================
Removing:
xinetd x86_64 2:2.3.14-39.el6_4 @anaconda-CentOS-201410241409.x86_64/6.6 259 k
Removing for dependencies:
telnet-server
x86_64 1:0.17-48.el6 installed 54 k

Transaction Summary
====================================================================================
Remove 2 Package(s)

Installed size: 313 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Erasing : 1:telnet-server-0.17-48.el6.x86_64 1/2
Erasing : 2:xinetd-2.3.14-39.el6_4.x86_64 2/2
Verifying : 1:telnet-server-0.17-48.el6.x86_64 1/2
Verifying : 2:xinetd-2.3.14-39.el6_4.x86_64 2/2

Removed:
xinetd.x86_64 2:2.3.14-39.el6_4

Dependency Removed:
telnet-server.x86_64 1:0.17-48.el6

Complete!
/#

yum은 의존성에 관련된 패키지를 찾아서 같이 삭제해준다.
설치할때에도 마찬가지다.

/# cd /media/CentOS_6.6_Final/Packages/
/media/CentOS_6.6_Final/Packages# rpm -i telnet-server-0.17-48.el6.x86_64.rpm
경고: telnet-server-0.17-48.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
오류: Failed dependencies:
xinetd is needed by telnet-server-1:0.17-48.el6.x86_64
/media/CentOS_6.6_Final/Packages#

- 의존성 문제로 설치하지 못했다.(telnet-server 를 먼저 삭제해야한다)


/media/CentOS_6.6_Final/Packages# yum install telnet-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Resolving Dependencies
--> Running transaction check
---> Package telnet-server.x86_64 1:0.17-48.el6 will be installed
--> Processing Dependency: xinetd for package: 1:telnet-server-0.17-48.el6.x86_64
--> Running transaction check
---> Package xinetd.x86_64 2:2.3.14-39.el6_4 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================
Package Arch Version Repository Size
====================================================================================
Installing:
telnet-server x86_64 1:0.17-48.el6 base 37 k
Installing for dependencies:
xinetd x86_64 2:2.3.14-39.el6_4 base 121 k

Transaction Summary
====================================================================================
Install 2 Package(s)

Total download size: 159 k
Installed size: 313 k
Is this ok [y/N]:

- yum 은 의존성과 관련된 패키지를 한번에 설치할수 있다.

yum 이 실행중일때는 yum 을 동시에 실행할 수 없다.

[root@localhost ~]# yum install telnet-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Existing lock /var/run/yum.pid: another copy is running as pid 40812.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 39 M RSS (332 MB VSZ)
Started: Tue Apr 12 18:21:50 2016 - 00:44 ago
State : Sleeping, pid: 40812

- yum 이 현재 실행중이며 끝날때까지 기다려서 실행하든지 그렇지 않으면
yum에 관련된 프로세스를 종료해야 한다.

[root@localhost ~]# pgrep -fl yum
40812 /usr/bin/python /usr/bin/yum erase php
[root@localhost ~]# kill 40812
[root@localhost ~]#
[root@localhost ~]# pgrep -fl yum
[root@localhost ~]#

- 이제 yum 을 다시 실행하면 된다.
패키지가 설치되어 있는지 확인하려면

/# yum list bash
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Installed Packages
bash.x86_64 4.1.2-29.el6 @anaconda-CentOS-201410241409.x86_64/6.6
Available Packages ; 아래 패키지를 update 할 수 있다.
bash.x86_64 4.1.2-33.el6_7.1 updates
/#

- 자세히 보고자 하는 경우에는

/# yum info bash
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Installed Packages
Name : bash
Arch : x86_64
Version : 4.1.2
Release : 29.el6
Size : 3.0 M
Repo : installed
From repo : anaconda-CentOS-201410241409.x86_64
Summary : The GNU Bourne Again shell
URL : http://www.gnu.org/software/bash
License : GPLv3+
Description : The GNU Bourne Again shell (Bash) is a shell or command language
: interpreter that is compatible with the Bourne shell (sh). Bash
: incorporates useful features from the Korn shell (ksh) and the C shell
: (csh). Most sh scripts can be run by bash without modification.

Available Packages
Name : bash
Arch : x86_64
Version : 4.1.2
Release : 33.el6_7.1
Size : 908 k
Repo : updates
Summary : The GNU Bourne Again shell
URL : http://www.gnu.org/software/bash
License : GPLv3+
Description : The GNU Bourne Again shell (Bash) is a shell or command language
: interpreter that is compatible with the Bourne shell (sh). Bash
: incorporates useful features from the Korn shell (ksh) and the C shell
: (csh). Most sh scripts can be run by bash without modification.

- bash 패키지 update 하는 경우에는 아래처럼.

[root@localhost ~]# yum update bash
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Update Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Resolving Dependencies
--> Running transaction check
---> Package bash.x86_64 0:4.1.2-29.el6 will be updated
---> Package bash.x86_64 0:4.1.2-33.el6_7.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================
Package Arch Version Repository Size
====================================================================================
Updating:
bash x86_64 4.1.2-33.el6_7.1 updates 908 k

Transaction Summary
====================================================================================
Upgrade 1 Package(s)

Total download size: 908 k
Is this ok [y/N]: y
Downloading Packages:
bash-4.1.2-33.el6_7.1.x86_64.rpm | 908 kB 00:00
경고: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Importing GPG key 0xC105B9DE:
Userid : CentOS-6 Key (CentOS 6 Official Signing Key)
Package: centos-release-6-6.el6.centos.12.2.x86_64 (@anaconda-CentOS-201410241409.x86_64/6.6)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : bash-4.1.2-33.el6_7.1.x86_64 1/2
Cleanup : bash-4.1.2-29.el6.x86_64 2/2
Verifying : bash-4.1.2-33.el6_7.1.x86_64 1/2
Verifying : bash-4.1.2-29.el6.x86_64 2/2

Updated:
bash.x86_64 0:4.1.2-33.el6_7.1

Complete!
[root@localhost ~]#

- repository 에서 패키지를 검색하는 경우에는

[root@localhost ~]# yum list compress
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
Error: No matching Packages to list
-------------------------------------------------------> 일치하는 패키지 없음.
[root@localhost ~]# yum search compress ; 패키지명을 정확히 모르면 search 옵션으로 검색해야 한다.
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.cdnetworks.com
* extras: centos.mirror.cdnetworks.com
* updates: centos.mirror.cdnetworks.com
============================== N/S Matched: compress ===============================
ncompress.x86_64 : Fast compression and decompression utilities
perl-Compress-Raw-Bzip2.x86_64 : Low-Level Interface to bzip2 compression library
perl-Compress-Raw-Zlib.x86_64 : Low-Level Interface to the zlib compression library
perl-Compress-Zlib.x86_64 : A module providing Perl interfaces to the zlib
: compression library
perl-IO-Compress-Base.x86_64 : Base Class for IO::Compress modules
bzip2.x86_64 : A file compression utility
gsm.i686 : Shared libraries for GSM speech compressor
gsm.x86_64 : Shared libraries for GSM speech compressor
gsm-tools.x86_64 : GSM speech compressor tools
gzip.x86_64 : The GNU data compression program
libtheora.i686 : Theora Video Compression Codec
libtheora.x86_64 : Theora Video Compression Codec
libvirt-java-devel.noarch : Compressed Java source files for libvirt-java
libvorbis.i686 : The Vorbis General Audio Compression Codec.
libvorbis.x86_64 : The Vorbis General Audio Compression Codec.
logrotate.x86_64 : Rotates, compresses, removes and mails system log files
lzo.i686 : Data compression library with very fast (de)compression
lzo.x86_64 : Data compression library with very fast (de)compression
lzop.x86_64 : Real-time file compressor
perl-IO-Compress-Bzip2.x86_64 : Perl interface to allow reading and writing of bzip2
: data
perl-IO-Compress-Zlib.x86_64 : Perl interface to allow reading and writing of gzip
: and zip data
perl-IO-Zlib.x86_64 : Perl IO:: style interface to Compress::Zlib
snappy.i686 : Fast compression and decompression library
snappy.x86_64 : Fast compression and decompression library
speex.i686 : A voice compression format (codec)
speex.x86_64 : A voice compression format (codec)
vorbis-tools.x86_64 : The Vorbis General Audio Compression Codec tools
xz.x86_64 : LZMA compression utilities
xz-libs.i686 : Libraries for decoding LZMA compression
xz-libs.x86_64 : Libraries for decoding LZMA compression
zip.x86_64 : A file compression and packaging utility compatible with PKZIP
zlib.i686 : The zlib compression and decompression library
zlib.x86_64 : The zlib compression and decompression library

Name and summary matches only, use "search all" for everything.
[root@localhost ~]#

- 검색하고자 한 패키지명의 정확한 이름은 ncompress 인것을 알수 있다.

댓글목록

mycolor님의 댓글

mycolor 작성일

* local repository 서버 만들기

- http 서버를 통해 패키지를 배포

1. 씨디롬 마운트
2. createrepo 패키지 설치
3. 패키지검색을 위한 메타데이터파일작성
4. repository 작성 및 check

아파치서버의 docuement root  디렉토리에 씨디롬을 마운트 한다.

mkdir -p  /var/www/html/centos6.8/cdrom
mount  /dev/cdrom /var/www/html/centos6.8/cdrom -o ro
yum install createrepo
cd /var/www/html/centos6.8
create repo .


[root@server100 yum.repos.d]# cat local-repo
[local-repo]
name = local-repository
baseurl=http://192.168.10.100/centos6.8
enabled=1
gpgcheck=0
[root@server100 yum.repos.d]#


접속자집계

오늘
79
어제
75
최대
611
전체
448,129
개인정보취급방침 서비스이용약관 twoseven.kr All rights reserved.
상단으로