Subversion 설치(linux)

2012. 2. 2. 14:03·Programing
반응형

소스 관리를 위해 사용되는 SVN 서버를 설치하는 방법을 소개할까 합니다.

 

Subversion을 설치합니다(yum을 이용하였습니다).

 

# yum install -y subversion

 

저장소 디렉터리를 생성합니다. 디렉터리는 임의로 지정 가능합니다.

 

파일 시스템을 이용한 방식

# svnadmin create --fs-type fsfs /var/repos

 

버클리DB를 이용한 방식

# svnadmin create --fs-type bdb /var/repos

 

디렉터리 그룹 권한을 변경합니다.

 

# chmod -R g+w /var/repos

 

SVN 설정을 변경합니다.

 

# vi /var/repos/conf/svnserve.conf

[general]

anon-access = read # 익명 사용자 읽기 권한

auth-access = write # 등록된 사용자 쓰기 권한

password-db = passwd # 인증에 사용될 패스워드 설정 파일

 

사용자 ID와 비밀번호를 추가합니다.

 

# vi /var/repos/conf/passwd

[user]

kyudoc = 1234

 

SVN 서버를 실행합니다.

 

# svnserve -d -r /var/repos

 

리눅스 부팅 시 자동으로 실행하도록 하시려면 '/etc/rc.d/rc.local' 파일에 다음과 같이 추가합니다.

 

# vi /etc/rc.d/rc.local

svnserve -d -r /var/repos

 

저장소에 trunk, branches, tags 디렉터리를 생성합니다.

 

먼저 SVN 에디터를 설정해야 합니다.

 

# vi ~/.bash_profile

export SVN_EDITOR=/usr/bin/vim

# source .bash_profile

 

먼저 trunk 디렉터리부터 생성합니다.

 

# svn mkdir svn://localhost/trunk

 

위와 같이 실행하면, 다음과 같이 vim 에디터가 자동으로 실행됩니다. :q를 눌러서 빠져 나옵니다.

 

--This line, and those below, will be ignored--

A    svn://localhost/trunk
~
(... 중략 ...)
~
"svn-commit.tmp" 4L, 77C                                      1,0-1         All

 

이어서 다음과 같이 물어보면 c를 입력합니다.

 

Log message unchanged or not specified
(a)bort, (c)ontinue, (e)dit:
c

 

root 암호와 svn에 등록한 사용자 ID 및 암호를 입력합니다.

 

Authentication realm: <svn://localhost:3690> 8951903c-f2c3-4193-bf79-c79530563c5e
Password for 'root': 루트 암호 입력
Authentication realm: <svn://localhost:3690> 8951903c-f2c3-4193-bf79-c79530563c5e
Username: 사용자 ID 입력
Password for 'kyudoc': 사용자 암호 입력

-----------------------------------------------------------------------
ATTENTION!  Your password for authentication realm:

   <svn://localhost:3690> 8951903c-f2c3-4193-bf79-c79530563c5e

can only be stored to disk unencrypted!  You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible.  See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/root/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes

Committed revision 1.

 

위와 같은 방법으로 branches와 tags 디렉터리를 생성합니다. 생성이 완료되면 다음과 같이 확인하실 수 있습니다.

 

# svn list svn://localhost/

branches/

tags/

trunk/

 

SVN 포트 번호는 3690인데, 방화벽이 실행되고 있으면 외부에서 접근할 수 없으므로 다음과 같이 해제합니다.

 

# iptables -I INPUT -p tcp --dport 3690 -j ACCEPT

# /etc/rc.d/init.d/iptables save

# /etc/rc.d/init.d/iptables restart

[출처] SVN 서버 설치하기 1 - 리눅스|작성자 kyudoc

반응형

'Programing' 카테고리의 다른 글

HTML 특수문자 기호표  (0) 2012.07.26
[자바스크립트]회원가입시 비밀번호 유효성검사  (0) 2012.03.28
Apache vhosts  (0) 2011.12.30
jd-gui 디컴파일  (0) 2011.12.30
JAVA JDK TimeZone 버그 (시스템 시간보다 9시간 늦게 표현되는 현상)  (0) 2011.04.19
'Programing' 카테고리의 다른 글
  • HTML 특수문자 기호표
  • [자바스크립트]회원가입시 비밀번호 유효성검사
  • Apache vhosts
  • jd-gui 디컴파일
애플자라
애플자라
    반응형
  • 애플자라
    애플자라
    애플자라
  • 전체
    오늘
    어제
    • 분류 전체보기 (655)
      • Linux (93)
      • Programing (92)
      • Flex, Laszlo (15)
      • Database (168)
      • Network (15)
      • Data (14)
      • Tips (119)
      • 여행★ (1)
      • Board (115)
      • 맛집탐방 (3)
      • 아이원츄 (12)
  • 블로그 메뉴

    • 홈
    • 태그
    • 미디어로그
    • 위치로그
    • 방명록
  • 링크

    • Love&Smile
    • Husk's repository
    • StartUp
    • DSDSTUDIO Experimentals
    • 신선
    • DEV.SEULKI.KR[이슬기]
    • Live Bit Block
  • 공지사항

  • 인기 글

  • 태그

    delete
    mssql
    서버
    테이블
    tomcat
    윈도우
    MySQL
    DATABASE
    데이터
    Linux
    리눅스
    자동차
    table
    apache
    Oracle
    select
    user
    server
    설정
    Shell
    파일
    IP
    sql
    백업
    java
    Toad
    오라클
    Windows
    DB
    eclipse
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
애플자라
Subversion 설치(linux)
상단으로

티스토리툴바