로그인
Sign in
---  rpm 파일 해제

rpm2cpio hadoop_2_3_2_0_2950-2.7.1.2.3.2.0-2950.el6.x86_64.rpm |cpio -idv


--- 디렉토리 생성
mkdir hadoop_2_3_2_0_2950-2.7.1.2.3.2.0-2950.el6.x86_64


--- 해제된 디렉토리를 위에서 생성한 디렉토리에 복사(디렉토리 안에 usr/ var/ 등이 포함되어야 함
cp -rp /tmp/imsi/usr/ ranger_2_3_2_0_2950-hdfs-plugin-0.5.0.2.3.2.0-2950.el6.x86_64/




---  패치 파일을 원하는 디렉토리에 복사

cp /tmp/imsi/hadoop-common-2.7.1.2.3.2.0-2950.jar /tmp/imsi/hadoop_2_3_2_0_2950-2.7.1.2.3.2.0-2950.el6.x86_64/usr/hdp/2.3.2.0-2950/hadoop


--- 임시 디렉토리로 돌아감
cd /tmp/imsi

--- 수정된 파일을 담은 디렉토리를 tar.gz로 압축
tar cvzf hadoop_2_3_2_0_2950-2.7.1.2.3.2.0-2950.el6.x86_64.tar.gz hadoop_2_3_2_0_2950-2.7.1.2.3.2.0-2950.el6.x86_64

--- rpm 파일 정보 확인
rpm -qip 파일.rpm 으로 파일 정보 확인 아래와 같은 정보를 spec파일에 수정

Name        : ranger_2_3_2_0_2950-hdfs-plugin  Relocations: (not relocatable)
Version     : 0.5.0.2.3.2.0                     Vendor: (none)
Release     : 2950.el6                      Build Date: Thu 01 Oct 2015 08:40:31 AM KST
Install Date: (not installed)               Build Host: c66-slave-20176e25-6.novalocal
Group       : System/Daemons                Source RPM: ranger_2_3_2_0_2950-0.5.0.2.3.2.0-2950.el6.src.rpm
Size        : 31839942                         License: Apache License v2.0
Signature   : RSA/SHA1, Thu 01 Oct 2015 08:56:01 AM KST, Key ID b9733a7a07513cad
URL         : http://ranger.apache.org/
Summary     : ranger plugin for hdfs
Description :
Ranger HDFS plugnin component runs within namenode to provoide enterprise security using ranger framework


--- 의존성 관련 패키지 수정
rpm -qRp hadoop_2_3_2_0_2950-2.7.1.2.3.2.0-2950.el6.x86_64.rpm 실행 후 나오는 값 저장하여 아래와 같이 Requires: 추가

Requires: rpmlib(FileDigests) <= 4.6.0-1
Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: rpmlib(CompressedFileNames) <= 3.0.4-1
Requires: /bin/bash  
Requires: /usr/bin/python  
Requires: rpmlib(PayloadIsXz) <= 5.2-1


--- 위의 정보로 spec 파일 수정
vi /root/rpmbuild/SPEC/hadoop_2_3_2_0_2950-yarn-2.7.1.2.3.2.0-2950.el6.x86_64.spec


Summary: The Hadoop NextGen MapReduce (YARN)  <--- 수정
Name: hadoop_2_3_2_0_2950-yarn   <--- 수정
Version: 2.7.1.2.3.2.0   <--- 수정
Release: 2950.el6   <--- 수정
Prefix:  /root
Group:  Development/Libraries
Source:  %{name}-%{version}-2950.el6.x86_64.tar.gz   <--- 수정
BuildRoot: /root/rpmbuild/%{name}-%{version}
License: GPL 
URL: http://hadoop.apache.org/core/  <--- 수정
Requires: hadoop_2_3_2_0_2950 = 2.7.1.2.3.2.0-2950.el6  <--- 수정
Requires: /bin/sh  
Requires: rpmlib(FileDigests) <= 4.6.0-1
Requires: rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: rpmlib(CompressedFileNames) <= 3.0.4-1
Requires: /bin/bash  
Requires: /usr/bin/env  
Requires: libc.so.6()(64bit)  
Requires: libc.so.6(GLIBC_2.2.5)(64bit)  
Requires: libc.so.6(GLIBC_2.3)(64bit)  
Requires: rpmlib(PayloadIsXz) <= 5.2-1

%description   <--- 수정
YARN (Hadoop NextGen MapReduce) is a general purpose data-computation framework.
The fundamental idea of YARN is to split up the two major functionalities of the
JobTracker, resource management and job scheduling/monitoring, into separate daemons:
ResourceManager and NodeManager.

The ResourceManager is the ultimate authority that arbitrates resources among all
the applications in the system. The NodeManager is a per-node slave managing allocation
of computational resources on a single node. Both work in support of per-application
ApplicationMaster (AM).

An ApplicationMaster is, in effect, a framework specific library and is tasked with
negotiating resources from the ResourceManager and working with the NodeManager(s) to
execute and monitor the tasks.


%prep
%setup -n hadoop_2_3_2_0_2950-yarn-2.7.1.2.3.2.0-2950.el6.x86_64    <--- 수정

rm -rf $RPM_BUILD_ROOT
rm -rf $RPM_BUILD
cp -rp /root/rpmbuild/BUILD/%{name}-%{version}-2950.el6.x86_64/ $RPM_BUILD_ROOT/

%files
/usr     <--- 수정
/var     <--- 수정

%clean




--- rpm build

rpmbuild -ba hadoop_2_3_2_0_2950-yarn-2.7.1.2.3.2.0-2950.el6.x86_64.spec


--- rpm 테스트
rpm --test -vv -Uvh hadoop_2_3_2_0_2950-2.7.1.2.3.2.0-2950.el6.x86_64.rpm 
rpm --test -vv -Uvh hadoop_2_3_2_0_2950-yarn-2.7.1.2.3.2.0-2950.el6.x86_64.rpm
rpm --test -vv -Uvh ranger_2_3_2_0_2950-hdfs-plugin-0.5.0.2.3.2.0-2950.el6.x86_64.rpm

List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 자주 사용하는 명령어 제비게릴라 2019-06-27 179
212 apache2 2.4.33 소스 설치 제비게릴라 2018-10-15 41
211 oom-killer 시에 종료 순서 정하기.. 제비게릴라 2018-05-11 49
210 centos 7의 kernel.sem 설정 방법 제비게릴라 2018-05-02 128
209 ubuntu 멀티 인터페이스 설정 작업 제비게릴라 2018-02-27 11
208 yum update 시 중단 되었을때 조치 법 제비게릴라 2017-01-15 677
207 파일 사이즈 비교 제비게릴라 2016-04-29 24
» rpm 패키징 방법 file 제비게릴라 2016-04-29 229
205 heartbeat 설정 방법 제비게릴라 2015-10-19 374
204 oracle 계정으로 ssh 접속시 Key 인증 방식의 로그인 오류 발생 조치 제비게릴라 2015-10-06 52
203 리눅스 date 명령 : 어제(과거) , 내일(미래) 날짜, 시간 구하기 제비게릴라 2015-03-20 106
202 redhat 커널 버전 리스트 제비게릴라 2015-02-10 65
201 문자열 추출 쉘 스크립트... 제비게릴라 2014-09-25 62
200 Partition 1 does not start on physical sector boundary. 메세지 삭제... 제비게릴라 2014-08-28 154
199 vi 치환 명령 제비게릴라 2014-03-12 173
198 프로세스 별 Disk I/O 확인 방법 (block_dump) [1] 제비게릴라 2013-07-16 854
197 logger 옵션... 제비게릴라 2013-05-27 369
196 vsftpd 시간 맞추기... 제비게릴라 2013-05-27 330
195 Linux Kernel Tuning 제비게릴라 2013-03-21 446
194 자동으로 멀티패스 잡았을시 블랙리스트 추가하기.. 제비게릴라 2012-12-06 1387
193 Nmon Analyser v33g – Excel 2010 64 bits file 하록 2012-08-07 551