Programmer Application Note

2015년 4월 9일 목요일

svn 서버 구축

오전 2:38 Posted by PAN.SPOT , No comments
ubuntu 14.04 기준

1.패키지 설치
$sudo apt-get install apache2
$sudo apt-get install apache2-utils
$sudo apt-get install subversion libapache2-svn
$sudo apt-get install rcconf

2.apache authorization 파일 생성
최초 생성 시
$sudo htpasswd -c /etc/apache2/authorization.auth 사용자명
사용자 추가 시
$sudo htpasswd  /etc/apache2/authorization.auth 사용자명

3. apache2 svn 설정
$sudo vi /etc/apache2/mods-enable/svntrac.conf

<Location /svn>
DAV svn
SVNListParentPath On
SVNParentPath /home/svn
# How to authenticate a user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /etc/apache2/authorization.auth
# Only authenticated users may access
Require valid-user
</Location>

4.프로젝트 폴더 생성
$cd svn경로
$mkdir 프로젝트명
$svnadmin create 프로젝트명
$chown -R www-data:www-data 프로젝트명
$svn mkdir http://192.168.0.232/svn/supernova/trunk -m 'add trunk'
$svn mkdir http://192.168.0.232/svn/supernova/branches -m 'add branches'
$svn mkdir http://192.168.0.232/svn/supernova/tags -m 'add tags'

5.시작 할때 마다 apache2 실행
$rcconf
apache2 선택

※ 기본 계정인 www-data를 변경 하고 싶다면?
$vi /etc/apache2/evnvars
export APACHE_RUN_USER=여기를 변경
export APACHE_RUN_GROUP=여기를 변경

0 개의 댓글:

댓글 쓰기