This Hadoop tutorial on MapReduce Example ( Mapreduce Tutorial Blog Series: https://goo.gl/w0on2G ) will help you understand how to write a MapReduce program in Java. You will also get to see multiple mapreduce examples on Analytics and Testing.
Check our complete Hadoop playlist here: https://goo.gl/ExJdZs
Below are the topics covered in this tutorial:
1) MapReduce Way
2) Classes and Packages in MapReduce
3) Explanation of a Complete MapReduce Program
4) MapReduce Examples on Analytics
5) MapReduce Example on Testing - MRUnit
레드햇 엔터프라이즈 리눅스 7 기반에 대한 운영자 가이드 기초편을 공유합니다.
부트로더 관리, 패키지, 네트워크, 스토리지 및 크래쉬 덤프 발생에 대한 관리까지 기초 운영 지식에 대한 부분을 본 문서를 통해 얻으실 수 있습니다.
오픈소스컨설팅의 문경윤차장께서 공유해주신 내용입니다.
If you want to stay up to date, subscribe to our newsletter here: https://bit.ly/3tiw1I8
An introduction to Apache Flume that comes from Hadoop Administrator Training delivered by GetInData.
Apache Flume is a distributed, reliable, and available service for collecting, aggregating, and moving large amounts of log data. By reading these slides, you will learn about Apache Flume, its motivation, the most important features, architecture of Flume, its reliability guarantees, Agent's configuration, integration with the Apache Hadoop Ecosystem and more.
This Hadoop tutorial on MapReduce Example ( Mapreduce Tutorial Blog Series: https://goo.gl/w0on2G ) will help you understand how to write a MapReduce program in Java. You will also get to see multiple mapreduce examples on Analytics and Testing.
Check our complete Hadoop playlist here: https://goo.gl/ExJdZs
Below are the topics covered in this tutorial:
1) MapReduce Way
2) Classes and Packages in MapReduce
3) Explanation of a Complete MapReduce Program
4) MapReduce Examples on Analytics
5) MapReduce Example on Testing - MRUnit
레드햇 엔터프라이즈 리눅스 7 기반에 대한 운영자 가이드 기초편을 공유합니다.
부트로더 관리, 패키지, 네트워크, 스토리지 및 크래쉬 덤프 발생에 대한 관리까지 기초 운영 지식에 대한 부분을 본 문서를 통해 얻으실 수 있습니다.
오픈소스컨설팅의 문경윤차장께서 공유해주신 내용입니다.
If you want to stay up to date, subscribe to our newsletter here: https://bit.ly/3tiw1I8
An introduction to Apache Flume that comes from Hadoop Administrator Training delivered by GetInData.
Apache Flume is a distributed, reliable, and available service for collecting, aggregating, and moving large amounts of log data. By reading these slides, you will learn about Apache Flume, its motivation, the most important features, architecture of Flume, its reliability guarantees, Agent's configuration, integration with the Apache Hadoop Ecosystem and more.
From: DataWorks Summit Munich 2017 - 20170406
While you could be tempted assuming data is already safe in a single Hadoop cluster, in practice you have to plan for more. Questions like: "What happens if the entire datacenter fails?, or "How do I recover into a consistent state of data, so that applications can continue to run?" are not a all trivial to answer for Hadoop. Did you know that HDFS snapshots are handling open files not as immutable? Or that HBase snapshots are executed asynchronously across servers and therefore cannot guarantee atomicity for cross region updates (which includes tables)? There is no unified and coherent data backup strategy, nor is there tooling available for many of the included components to build such a strategy. The Hadoop distributions largely avoid this topic as most customers are still in the "single use-case" or PoC phase, where data governance as far as backup and disaster recovery (BDR) is concerned are not (yet) important. This talk first is introducing you to the overarching issue and difficulties of backup and data safety, looking at each of the many components in Hadoop, including HDFS, HBase, YARN, Oozie, the management components and so on, to finally show you a viable approach using built-in tools. You will also learn not to take this topic lightheartedly and what is needed to implement and guarantee a continuous operation of Hadoop cluster based solutions.
Bu sunum web uygulamalarının kritikliği ne kadar düşük olursa olsun uygulama açıklıklarının sistem ve ağ güvenliğini tehdit edebileceğini göstermektedir.
Jenkins to Gitlab - Intelligent Build-PipelinesChristian Münch
At netz98 we moved from Jenkins to Gitlab. The slides show some insides about Testing of PHP libraries, Magento 1 and Magento 2 modules. How to setup a scalable and fast Gitlab-Pipeline with Docker images.
File server resource manager (fsrm) in windows server 2016Ahmed Abdelwahed
in this lab we will provide complete information to implementing and configure file Server Resource Manager in windows server 2016
Conents
Existing Active directory environment
Implementing FSRM.
Task 1: add file Server Resource Manager
Task 2: Create a quota template.
Task 3: Configure a quota based on the quota template.
Task 3: Test that the quota is functional
Task 4: Create a file screen (Block executable files)
Task 5: Test that the File Screen is functional
Task 7: Generate an on-demand storage report
How to Survive an OpenStack Cloud Meltdown with CephSean Cohen
What if you lost your datacenter completely in a catastrophe, but your users hardly noticed? Sounds like a mirage, but it’s absolutely possible.
This talk will showcase OpenStack features enabling multisite and disaster recovery functionalities. We’ll present the latest capabilities of OpenStack and Ceph for Volume and Image Replication using Ceph Block and Object as the backend storage solution, as well as look at the future developments they are driving to improve and simplify the relevant architecture use cases, such as Distributed NFV, an emerging use case that rationalizes your IT by using less control planes and allows you to spread your VNF on multiple datacenters and edge deployments.
In this session you will learn about wew OpenStack features enabling Multisite and distributed deployments, as well as review key use cases, architecture design and best practices to help operations avoid the OpenStack cloud Meltdown nightmare.
https://youtu.be/n2S7uNC_KMw
https://goo.gl/cRNGBK
This presentation examines the way files are stored in Linux following the File System Hierarchy. It also addresses the recent proposals by Fedora to change this to merge bin directories.
Pentest ekiplerinin kullandığı Kali dağıtımı ile Linux dünyasına giriş dökümanıdır. Bu döküman; güvenlik alanına giriş yapmak isteyen insanların Türkçe kaynak problemini gidermeyi amaçlayarak hazırlanmıştır. Bu açık kaynak projesine katkı sağlamak isteyen gönüllü linux kullanıcıları ise bize ulaşabilirler. Yazım hatası, anlam karmaşası, yanlış bilgi veya iyileştirmeler için mehmet.ince@intelrad.com adresine mail atabilirsiniz. İyi çalışmalar.
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-RegionJi-Woong Choi
OpenStack Ceph & Neutron에 대한 설명을 담고 있습니다.
1. OpenStack
2. How to create instance
3. Ceph
- Ceph
- OpenStack with Ceph
4. Neutron
- Neutron
- How neutron works
5. OpenStack HA- controller- l3 agent
6. OpenStack multi-region
리눅스 pacemaker 기반의 High Availaiblity 구성방법에 대해 설명합니다. pacemaker를 사용하는 다른 리눅스 기반도 구성이 가능합니다.
Pacemaker 기반 Linux High Availability 입문용으로는 적합하지 않을 수 있습니다. Pacemaker 기반 Linux High Availability를 한 번도 설치 및 구성을 하지 않은 리눅스 관리자라면 설치 문서를 먼저 참고하십시오.
RHEL7 및 CentOS 7을 중심으로 레드햇 계열의 리눅스에 적합한 내용으로 작성되었습니다.
From: DataWorks Summit Munich 2017 - 20170406
While you could be tempted assuming data is already safe in a single Hadoop cluster, in practice you have to plan for more. Questions like: "What happens if the entire datacenter fails?, or "How do I recover into a consistent state of data, so that applications can continue to run?" are not a all trivial to answer for Hadoop. Did you know that HDFS snapshots are handling open files not as immutable? Or that HBase snapshots are executed asynchronously across servers and therefore cannot guarantee atomicity for cross region updates (which includes tables)? There is no unified and coherent data backup strategy, nor is there tooling available for many of the included components to build such a strategy. The Hadoop distributions largely avoid this topic as most customers are still in the "single use-case" or PoC phase, where data governance as far as backup and disaster recovery (BDR) is concerned are not (yet) important. This talk first is introducing you to the overarching issue and difficulties of backup and data safety, looking at each of the many components in Hadoop, including HDFS, HBase, YARN, Oozie, the management components and so on, to finally show you a viable approach using built-in tools. You will also learn not to take this topic lightheartedly and what is needed to implement and guarantee a continuous operation of Hadoop cluster based solutions.
Bu sunum web uygulamalarının kritikliği ne kadar düşük olursa olsun uygulama açıklıklarının sistem ve ağ güvenliğini tehdit edebileceğini göstermektedir.
Jenkins to Gitlab - Intelligent Build-PipelinesChristian Münch
At netz98 we moved from Jenkins to Gitlab. The slides show some insides about Testing of PHP libraries, Magento 1 and Magento 2 modules. How to setup a scalable and fast Gitlab-Pipeline with Docker images.
File server resource manager (fsrm) in windows server 2016Ahmed Abdelwahed
in this lab we will provide complete information to implementing and configure file Server Resource Manager in windows server 2016
Conents
Existing Active directory environment
Implementing FSRM.
Task 1: add file Server Resource Manager
Task 2: Create a quota template.
Task 3: Configure a quota based on the quota template.
Task 3: Test that the quota is functional
Task 4: Create a file screen (Block executable files)
Task 5: Test that the File Screen is functional
Task 7: Generate an on-demand storage report
How to Survive an OpenStack Cloud Meltdown with CephSean Cohen
What if you lost your datacenter completely in a catastrophe, but your users hardly noticed? Sounds like a mirage, but it’s absolutely possible.
This talk will showcase OpenStack features enabling multisite and disaster recovery functionalities. We’ll present the latest capabilities of OpenStack and Ceph for Volume and Image Replication using Ceph Block and Object as the backend storage solution, as well as look at the future developments they are driving to improve and simplify the relevant architecture use cases, such as Distributed NFV, an emerging use case that rationalizes your IT by using less control planes and allows you to spread your VNF on multiple datacenters and edge deployments.
In this session you will learn about wew OpenStack features enabling Multisite and distributed deployments, as well as review key use cases, architecture design and best practices to help operations avoid the OpenStack cloud Meltdown nightmare.
https://youtu.be/n2S7uNC_KMw
https://goo.gl/cRNGBK
This presentation examines the way files are stored in Linux following the File System Hierarchy. It also addresses the recent proposals by Fedora to change this to merge bin directories.
Pentest ekiplerinin kullandığı Kali dağıtımı ile Linux dünyasına giriş dökümanıdır. Bu döküman; güvenlik alanına giriş yapmak isteyen insanların Türkçe kaynak problemini gidermeyi amaçlayarak hazırlanmıştır. Bu açık kaynak projesine katkı sağlamak isteyen gönüllü linux kullanıcıları ise bize ulaşabilirler. Yazım hatası, anlam karmaşası, yanlış bilgi veya iyileştirmeler için mehmet.ince@intelrad.com adresine mail atabilirsiniz. İyi çalışmalar.
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-RegionJi-Woong Choi
OpenStack Ceph & Neutron에 대한 설명을 담고 있습니다.
1. OpenStack
2. How to create instance
3. Ceph
- Ceph
- OpenStack with Ceph
4. Neutron
- Neutron
- How neutron works
5. OpenStack HA- controller- l3 agent
6. OpenStack multi-region
리눅스 pacemaker 기반의 High Availaiblity 구성방법에 대해 설명합니다. pacemaker를 사용하는 다른 리눅스 기반도 구성이 가능합니다.
Pacemaker 기반 Linux High Availability 입문용으로는 적합하지 않을 수 있습니다. Pacemaker 기반 Linux High Availability를 한 번도 설치 및 구성을 하지 않은 리눅스 관리자라면 설치 문서를 먼저 참고하십시오.
RHEL7 및 CentOS 7을 중심으로 레드햇 계열의 리눅스에 적합한 내용으로 작성되었습니다.
클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning Ji-Woong Choi
TTA에 KVM 기반 프로비저닝 기술에 대한 데모 세션을 포함하는 세미나 관련 자료입니다. 클라우드환경으로 가고자 해서 Paas를 어떤 플랫폼위에 올린다면 그리고 가상화 환경이나 클라우드 환경으로 올린다면 어떤 환경으로 올릴것인가를 고민하여야 합니다.
그리고 이 hypervisor중에 cloud 환경에서 가장 주목받는 kvm을 기반으로 하는 두가지 가상화 클라우드 솔루션인 rhev와 openstack을 잠시 살펴볼 것입니다.
그리고 이러한 가상화 클라우드 환경에서 자동화 하는 솔류션을 어떻게 고려해야 하는가를 살펴보고, 그런 솔류션중에 하나인 아테나 피콕에 대해 살펴보겠습니다.
그리고 오픈스택환경하에서 구축해서 사용했던 사용기와 이를 자동화하기위해 개발자들이 사용했던 간단한 ansible provisioning 모습을 시연합니다.
오픈스택이 가진 기술에 대하여 설명합니다.
1. 오픈소스기반 OpenStack 클라우드 시스템
2. OpenStack 기술 개요 및 동향
3. OpenStack 의 Community 개발 체계
4. OpenStack HA를 위한 방안
5. OpenStack SDN 개발 동향
6. Neutron OVS-DPDK 가속화와 구현방안
본 자료는 WildFly, JBoss AS7, JBoss EAP6에 대한 교육 자료입니다. 처음 접하시는 분들이나 세팅이 필요한 분들은 본 자료를 활용하시면 됩니다.
교육이 필요하시면 오픈소스컨설팅 페이스북에 글을 남겨주세요.
https://www.facebook.com/osckorea?ref=hl
2015년 하반기에는 총 7건의 공유자료를 slideshare에 게시하였습니다.
오픈스택, pacemaker, Docker 등과 같은 클라우드 인프라 구축 기술 정보를 만나 보세요.
- 2015. 07 ~ 2016. 03사이의 크리티컬 이슈 해결방안
- 유용한 팁 정보 등의 내용
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick GuideJi-Woong Choi
본 문서는 RHEL에 내장된 재해복구솔루션 ReaR (Relax and Recover)를 이용하여 OS 영역의 데이터를 백업하고 복구하는 방법을 다루고 있습니다. ReaR는 iso를 비롯한 다양한 백업 데이터 포맷을 지원하나, 이 문서에서는 CD/DVD 미디어 반입/보관이 보안상 대부분 허용되지 않는 기업 환경에서도 원활히 사용할 수 있는 PXE boot를 지원하는 포맷으로 ReaR 백업 데이터를 생성하고 복구하는 방법만을 자세히 설명합니다.
* 혼자 공부하려고 만든 자료이기 때문에 정확하지 않는 내용이나 오류가 있을 수 있습니다. 잘못된 점은 언제든지 고쳐주시면 배우겠습니다.
* phpDocumentor란?
phpDocumentor는 제작한 프로젝트에 대해서 문서화 해주는 도구를 말한다. 공식 홈페이지에서는 'PHP에 대한 세계 표준 자동 문서 도구(phpDocumentor is the world standard auto-documentation tool for PHP.)'라고 설명하고 있다.
우선은 phpDocumentor가 왜 수면위로 떠오르게 되었는지에 대해서 짚고 넘어가야 할 것 같다. PHP는 본래 컴파일 없이 라인 단위로 처리하는 스크립트 언어이다. 아무래도 스크립트 언어는 라인별 처리라는 개념 덕분인지 진입장벽이 낮아 독학하기에 좋은 언어였다. 그로 인해 사용률이 많아지고 인기가 많아지는 동시에 스크립트 언어에 대한 약점에 대해서 생각하게 되었던 것 같다. PHP 5로 넘어가면서 본격적으로 객체에 대한 개념이 강화되고, 이를 이용한 다양한 프레임워크가 개발되고 있다. 스크립트 언어에 대한 약점을 컴파일 언어에서 그 해답을 찾고자 했던 것 같다.
컴파일 언어의 대표적인 사례인 JAVA에서는 이미 javadoc이라는 문서화 도구가 존재하고 있었다. 아마도 phpDocumentor는 javadoc의 php 버전이었으리라. 사용 방법도 javadoc과 크게 다르지 않다. php도 객체지향 개념이 나오면서 어떤 정형화된 패턴이 나오는 것이 가정해졌기 때문에 그 공통적인 부분을 문서를 만들 수 있게 되었다.
* 주석
주석은 자신을 포함하여 프로젝트에 참여하는 사람들에게 쉽게 알아볼 수 있도록 하는 역할을 해준다. 주석을 최소화하는 것을 장려하는 사람들도 있긴 하지만, 프로젝트가 커질 수록 작은 코드가 어떤 역할을 할 수 있는지 모를 수도 있다. 그때 작업자는 그 코드에 대해서 설명글을 달아줄 수 있다. 주석은 사람이 알아볼 수 있게 쓰는 일종이 메모의 역할을 한다.
* 마무리
phpDocumentor로 대단한 것을 할 수 있는 것은 아니다. 어쩌면 이 도구로 할 수 있는 것은 자료보관일 뿐일 것이다.
사실 Phpdoc이 많은 곳에서 쓰이고 있지는 않다. 대부분의 개발자들은 코드를 보면 쉽게 알 수 있을 것이라고 말하거나 귀찮아 한다. 그만큼 손도 많이 가고 굳이 해야 하나 싶기도 하는 작업이 바로 이 작업이다. 프로젝트가 개발자에 종속되는 것은 매우 좋지 않은 현상이며, 많은 개발자들이 수긍할 수 있는 코드가 좋은 프로젝트라고 생각한다. 그들이 쉽게 프로젝트의 유지보수에 투입되려면 한눈에 정리되어있는 문서가 필요한데 문서의 유지보수는 생각보다 어렵다. 그래서 이 도구가 문서를 작성하는 데에 중요한 역할을 하는 것이다.
기존에 저희 회사에서 사용하던 모니터링은 Zabbix 였습니다.
컨테이너 모니터링 부분으로 옮겨가면서 변화가 필요하였고, 이에 대해서 프로메테우스를 활용한 모니터링 방법을 자연스럽게 고민하게 되었습니다.
이에 이영주님께서 테크세션을 진행하였고, 이에 발표자료를 올립니다.
5개의 부분으로 구성되어 있으며, 세팅 방법에 대한 내용까지 포함합니다.
01. Prometheus?
02. Usage
03. Alertmanager
04. Cluster
05. Performance
2018년도 Amazon AWS re:Invent Machine Learning 부분에 대한 요약을 오픈소스컨설팅 서경빈(AWS SA)님이 해주셨습니다.
사내 발표 때 아주 쉽게 설명해주셔서 좋았는데, 해당 내용은 Tech Blog에서도 확인이 가능합니다.
https://tech.osci.kr/2018/12/06/50693623/
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트Ji-Woong Choi
Docker를 활용하여 Gitlab CI/CD 설치 구성 및 샘플 테스트를 위한 가이드 문서이며, Docker 및 Gitlab에 대한 개요 및 사용법에 대해서는 다루지 않습니다. Docker image를 이용 Gitlab 및 Gitlab CI/CD 설치 및 구성 후 Sample Spring boot web application을 이용하여 소스 변경에 따른 commit이 발생 했을 때 Gitlab CI/CD 기능을 통해 application 테스트, 빌드, 배포까지의 일련의 과정이 자동으로 진행되는지를 테스트 하는 내용입니다.
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항Ji-Woong Choi
Cloud 기반으로 U2C(Unix to Cloud),U2L(Unix to Linux) 마이그레이션에 대한 가이드 라인과 사이징 관련 고려 사항에 대해 설명한 자료입니다.
많은 전환 프로젝트에서 추출된 경험치가 들어가 있으며, 전환별 난이도 및 고려사항이 들어가 있습니다.
장소 : 미국 보스턴 Hynes Convention Center
일시 : 2017년 5월 6일 ~ 11일 (미국 동부 시각)
참가 인원 : 5000명 이상
참가 업체 : 1014개
참가국 : 63개국
세션 수 : 750여 개(이전 Summit 대비 약 250여 개 증가)
아틀라시안 JIRA를 사용할 때 가장 핵심적으로 해야 할 내용들만 추려서 가이드 문서를 작성하였습니다.
그러한 작업들로는 프로젝트, 스킴(Scheme), 이메일 세팅, 권한 관리, 백업/복구 등이 있습니다.
관리자가 이런 일을 잘 할 수 있도록 핵심적인 내용만으로 구성한 문서를 공유합니다.
OpenStack Liberty 버전의 간단한 인스턴스 관련 사용자 매뉴얼입니다.
아래의 항목들이 구성되어 있습니다.
1. 이미지(Glance) 서비스 이용하기
1.1. 이미지 생성하기
2. 네트워크(Neutron) 서비스 이용하기
2.1. Private 네트워크 생성하기
2.2. Router 생성하기
3. 접근 & 보안 이용하기
3.1. 시큐리티 그룹 생성
3.2. 키 페어 생성
3.3. 유동 IP
4. 인스턴스(Compute - Nova) 서비스 이용하기
4.1. 인스턴스 구동
4.2. 유동 IP 연결
4.3. 유동 IP 연결 확인
5. 볼륨(Cinder-Block) 서비스 이용하기
5.1. 볼륨 생성
2. 2
RPM 패키징의 장점I
II RPM 패키징에 필요한 정보
III RPM 패키징 프로세스
IV 소스파일 준비 및 빌드환경 준비
목차
V SPEC 파일 정의
VI 패키징
3. 3
컴포넌트의 설명 / Version 관리 / 패키지 그룹 / Project URL 및 기타 정보 포함 가능
yum repository를 통하여 클라이언트가 쉽게 소프트웨어를 검색 가능
클라이언트가 yum / rpm / PackageKit 등을 이용하여 손쉽게 소프트웨어를 설치 가능
새로운 버전의 소프트웨어를 쉽게 업데이트 / 배포 / 삭제 가능
RPM 패키징의 장점
4. 4
RPM 커맨드 및 옵션 / Text 에디터 사용 방법에 대한 지식이 필요
패키징 하고자 하는 소프트웨어의 설치 위치 / Documents / 구성 파일에 대한 지식 필요
각 파일에 대한 소유자 / 권한 등의 설정이 필요
의존성이 있는 파일이나 다른 패키지에 대한 정보
이전 / 신규 changeLog 정보
RPM 패키징에 필요한 정보
5. 5
RPM 패키징 프로세스
소스 파일 준비
• *.tar.gz 등의 소스파일
• 컴파일 하기위한 소스 파일
• 기타 패키징에 필요한 파일 준비
SPEC 파일 작성 • SPEC 파일 작성 방법에 따라 작성
RPM 빌드 • rpmbuild 커맨드를 통하여 rpm 패키징 완료
빌드 환경 준비
• 빌드 유저 생성
• rpm-build 패키지 설치
6. 6
유저 생성 및 rpm-build 패키지 설치
소스파일 준비 및 빌드환경 준비
# useradd builduser
# yum install rpm-build
빌드 디렉토리 생성
소스의 압축을 풀어서 컴파일 하는 디렉토리
소스 RPM이 만들어지는 디렉토리
SPEC 파일이 위치하는 디렉토리
패키징할 압축된 소스파일과 패치를 넣어두는 디렉토리
아키텍처별로 하위 디렉토리가 추가로 생성 되고 하위 디렉토리 및에 RPM 바이너리 파일이 생성 됨
# mkdir -p ~/rpmbuild/{BUILD, BUILDROOT, RPMS ,SOURCES ,SPECS ,SRPMS}
패키징하기전에 패키징할 파일들을 옮겨놓는 디렉토리
7. 7
SPEC 파일 정의 – 매크로
%define version 1.0.0
%define name osc-repository
version 이라는 매크로를 정의
name 이라는 패크로를 정의
주로 최상단에 먼저 정의 함
매크로를 정의하면 spec 파일 내부에서 %{매크로명}과 같은 형식으로 참조 가능
상기 매크로에 기반하여 %{version} 이라는 항목이 spec 파일내에서 모두 1.0.0.으로 치환 됨
상기 매크로에 기반하여 %{name} 이라는 항목이 spec 파일내에서 모두 osc-repository로 치환 됨
8. 8
SPEC 파일 정의 - 헤더
Name: osc-repository
Version: 1.0.0
Release: 1%{?dist}
Summary: Open Source Consulting Official Repository
Group: System Environment/Base
License: GPLv2
URL: www.osci.kr
Source: %{name}-%{version}.tar.gz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Patch : osc-repository.patch
BuildRequires: /bin/rm, /bin/mkdir, /bin/cp
Requires: /bin/bash
%description
Open Source Consulting Official Repository Package
패키지 이름
패키지 버전 (※ 버전이 같다면, 같은 소스를 사용했다는 의미)
릴리즈 번호 (※ 버전과 무관하여, 같은 버전의 패키지들을 구분하기 위한 용도로 사용 함)
패키지에 대한 간단한 설명
프로그램의 그룹
프로그램의 라이선스
프로젝트 홈페이지 주소
소스파일0번째를 의미. 패키지를 빌드할 때 사용 됨
RPM 파일 빌드에 사용할 루트 디렉토리를 지정
패치가 있는 경우 이 부분의 패치 파일을 정의
패키지를 build 하기위한 패키지 및 명령어. 주로 devel 패키지가 됨
패키지를 설치시에 필요한 rpm 지정. 의존성 패키지를 지정.
패키지의 상세 설명
9. 9
SPEC 파일 정의 - 명령실행
%prep
%setup
%build
%install
install -Dpm 644 RPM-GPG-KEY-OSC-REPO $RPM_BUILD_ROOT%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-OSC-
REPO
install -Dpm 644 osc.repo $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/osc.repo
%clean
rm -rf $RPM_BUILD_ROOT
%files
%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-OSC-REPO
%{_sysconfdir}/yum.repos.d/osc.repo
압축을 풀고 압축 푼 디렉토리로 경로를 이동하기 위한 명령을 명시
%setup은 미리 명시된 내부 매크로이며 소스로 지정된 tar 파일의 압축을 풀고 해당 경로로 이동하는 작업 까지 진행
프로그램 빌드를 위한 명령을 기재. 컴파일이 필요한 경우 ./configure 커맨드를 비롯한 빌드 옵션을 기재 함
컴파일 된 프로그램을 설치하는 부분
RPM으로 패키징 될 파일을 하나씩 지정 하는 부분
RPM 패키지를 다 만들고 어떤 작업을 하는지 지정하는 부분
SPEC 파일에 명시되지 않은 %(_sysconfigdir}은 /usr/lib/rpm/macros 파일에 선언 됨
install 사용법은 install <옵션> <소스> <목적지> 이며 소스파일을 목적지로 파일을 복사하는 역할을 수행
%RPM_BUILD_ROOT 는 SPEC 파일에 BUILDROOT에 명시한 경로 이며, %{_sysconfdir}은 /usr/lib/rpm/macros에
명시된 /etc 이다.
10. 10
SPEC 파일 정의 - ChangeLog
%changelog
* Tue Jan 26 2016 hipark <hipark@osci.kr> - 1-1
- First Release
RPM으로 패키징 될 파일을 하나씩 지정 하는 부분
changelog는 변경된 부분을 적는 곳
아래의 양식을 지켜서 기재할 것
%changelog
* [ 날짜 ] [ 이름 ] [e-mail]
- [ 바뀐 내용 1]
- [ 바뀐 내용 2]
11. 11
패키징
# rpmbuild -ba osc-repository.spec rpmbuild/SPEC 경로에서 RPM 빌드를 시작
exit 0 으로 종료되면 패키징이 정상적으로 완료된 것이다
# rpm -Uvh osc-repository-1.0.0-1.el6.x86_64.rpm
# rpm -e osc-repository-1.0.0-1.el6.x86_64.rpm rpmbuild/RPMS 경로에서 RPM 패키지를 확인할 수 있으며, RPM 설치 및 삭제 테스트를 진행
RPM 설치 및 삭제 테스트
RPM 패키징