1. 구성
- Private EC2 에 svn 설치
- 터널링으로 svn 접근 확인
1) SG 설정
- 22 : bastion 에서만 ssh 가능하게 설정
- 3690 : svn
- 서버 생성 완료 (moon_svn)
2. moon_svn 접속
- private ec2이므로 bastion 통해 ssh 접속
( 접속 방법 참고)
https://ans-moon.tistory.com/13
3. svn 설치
$ sudo yum -y install subversion
4. 저장소 생성
$ sudo mkdir -p /svn/repo_test
$ sudo svnadmin create --fs-type fsfs /svn/repo_test/
5. svnserve.config 파일 수정
sudo vim /svn/repo_test/conf/svnserve.conf
# 주석 처리된 부분 수정
anon-access = none # 비인증 계정 : 접근 권한 없음
auth-access = write # 인증 계정 : 쓰기 권한
password-db = passwd # 인증 계정 정보
realm = My First Repository # 인증할 때 보여주는 간단한 저장소 설명(생략가능)
6. 계정 생성
sudo vim /svn/repo_test/conf/passwd
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
# harry = harryssecret
# sally = sallyssecret
moon-user = 123456
7. sysconfig 수정
sudo vim /etc/sysconfig/svnserve
# OPTIONS is used to pass command-line arguments to svnserve.
#
# Specify the repository location in -r parameter:
#OPTIONS="-r /var/svn"
OPTIONS="--threads --root /svn/repo_test"
8. 시스템 재시작 및 상태확인
$ sudo systemctl restart svnserve
$ sudo systemctl status svnserve
$ sudo systemctl enable svnserve
9. svn 접근
svn://<서버IP:3690>/repo_test
- 하지만 Private 환경이기 때문에 서버 IP로 접근할 수 없다
- 터널링으로 접근 확인
https://ans-moon.tistory.com/16
'AWS' 카테고리의 다른 글
MariaDB Replication 구성하기 (0) | 2022.11.09 |
---|---|
[AWS] 터널링 (0) | 2022.11.03 |
[AWS] Jenkins 설치 & ALB (0) | 2022.11.03 |
[AWS] Bastion host 에서 Private EC2 접속하기 (0) | 2022.11.03 |
[AWS] Nat Gateway 생성하기 (0) | 2022.11.03 |