Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 프로그래머스
- terraform backend
- Mac
- session manager
- Docker
- PrivateSubnet
- heapq
- terraform 기본개념
- 이진탐색
- ec2
- endpoint
- haproxy
- Timezon설정
- JWT
- Python
- SELinux비활성화
- linuxr계정설정
- s3
- binarysearch
- terraform 설치
- java
- lsof
- Process monitoring
- Jenkinspipeline
- 인텔리제이
- terraform main commands
- terraform
- Jenkins
- algorithm
- terraform variable
Archives
- Today
- Total
MONG 기술블로그
CICD 환경 구성 - Jenkins 설치하기 본문
AWS Public Cloud 환경에 EC2를 이용하여 Jenkins를 구축해보자.
다음과 같은 순서로 구축할 예정이다.
- Jenkins 설치
- Jenkins Home 디렉토리 변경
- Jenkins 계정 생성 및 접속
하기 스크립트를 수행하여 젠킨스를 설치한다.
# git install
yum -y install git
# install java 11
yum -y install java-11-amazon-corretto.x86_64
# import jenkins repository
yum -y update
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
yum -y upgrade
# Add required dependencies for the jenkins package
yum -y install jenkins
systemctl enable jenkins
systemctl daemon-reload
Linux의 경우 / ( root volume )의 사용량이 100%가 될 경우 이슈가 발생하므로 /data 볼륨을 따로 구축하여 Jenkins 홈디렉토리를 변경해주자.
다음 2개의 파일을 열어서 "/var/lib/jenkins" 로 되어있는 부분을 "/data/jenkins"로 모두 수정한 뒤에 변경사항을 반영한다
/usr/lib/systemd/system/jenkins.service
/etc/sysconfig/jenkins
위 두개 사항을 변경하고나면 systemctl daemon-reload 명령어를 수행하여 설정값을 반영한다.
그 다음 jenkins 홈 디렉토리를 생성하고, 소유권 변경을 위해 다음 명령어를 수행한 뒤에 jenkins를 실행한다.
- mkdir /data/jenkins
- chown jenkins:jenkins /data/jenkins
- systemctl start jenkins
이제 /data/jenkins 에 jenkins 관련 파일이 생성된 모습을 확인할 수 있다.
이제 젠킨스 서버 내에 생성된 비밀번호를 하기 이미지의 패스워드 란에 기입하여 어드민 계정을 생성해보자
패스워드란에 위 비밀키를 입력하면 Jenkins 설치 및 구성이 완료된다.
'Jenkins' 카테고리의 다른 글
CICD 환경 구성 - Jenkins Pipeline과 GitHub연동 (0) | 2023.06.24 |
---|---|
React 기반 영화 앱 & Jenkins Pipeline 구축. (0) | 2022.02.07 |
Comments