SVN(subversion) 이란
자주 업데이트 되는 소스의 버전을 관리할수있게 해주는 저장소 라고할수있겠다.
그냥 소스작업하면 그 소스 복사떠서 따로 저장하면 되겠지 라는생각하는사람. 있을수있다.
svn 설치도 번거롭기도하고.
하지만.
언제까지 그렇게 살탠가. 귀차니즘은 인류의 적.
한번만 귀찮은거 참으면 대대손손 편하다. 그리고 안전하기까지!
1. SVN 설치
# yum install -y subversion
2. SVN 사용자 추가
# adduser svn
3. SVN 사용자 비번 적용
# passwd svn
만들 비밀번호 입력
확인차 한번더 입력
4. 저장소 생성
# svnadmin create --fs-type fsfs /home/svn/repo
(repo 부분은 자신이 원하는 저장소이름으로 변경해도 무관하다)
5. 저장소에 대한 권한을 svn 계정으로 변경
# chown -R svn:svn /home/svn/repo
6. SVN 설정파일 수정 (요거요거 기존 SVN을 덤프떠서 복사할지라도 무조건 거처야하는 필수사항)
오픈소스시대에 복사/붙여넣기에 편리함을 너무 절실하게 느끼기에. ㅎㅎ 일일이 수정하는 번거로움을 없애기 위해 아래처럼 전체를 작성해봅니다. 긁어서 붙여넣기 하Thㅔ요 !
### These options control access to the repository for unauthenticated
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
# 익명 사용자의 읽기 허용
### and authenticated users. Valid values are "write", "read",
### and "none". The sample settings below are the defaults.
# 익명 사용자의 읽기 허용
anon-access = read
# 익명 사용자의 쓰기 허용
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
auth-access = write
### The password-db option controls the location of the password
### database file. Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
# 접속계정에 대한 패스워드 설정파일
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file. If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
# 외부에서 접속할때 사용할 svn 이름 (아래 repo 부분만 내가만든 svn 저장소 이름과 같게하자)
realm = repo Repository
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control. Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file. If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa. The default realm
### is repository's uuid.
# 외부에서 접속할때 사용할 svn 이름 (아래 repo 부분만 내가만든 svn 저장소 이름과 같게하자)
realm = repo Repository
[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256
7. 사용자 비밀번호 설정
# vi /home/svn/repo/conf/passwd
idnoname=passwd1234
이런식으로 아이디=비밀번호로 작성해서 추가해준다.
8. svn 시작
# svnserve -d -r /home/svn
끝~
추가적으로 svn 기본디렉토리 만들기 (trunk, branches, tags 등 생성하는건 내용을 참 잘 정리해주신분이 계시므로 그쪽 블로그를 링크하겠습니다.
댓글
댓글 쓰기