svn 리파지토리를 웹으로 봐야 하는 일이 생겼다.
그래서 리파지토리 뷰를 위해 websvn 을 설치해보았다.
1. WebSVN 다운로드 – http://websvn.tigris.org
2. WebSVN 압축 해제
$ tar zxvf websvn-2.3.3.tar.gz $ mv websvn-2.3.3 /var/www $ cd /var/www $ ln -s ./websvn-2.3.3 websvn
3. config.php 수정
$ cd websvn/include
$ cp distconfig.php config.php
$ vi config.php
...
$config->parentPath('/svnrepos'); // svn 프로젝트 폴더 설정
$config->expandTabsBy(4); // tab 간격을 4로 지정
...
4. command.php 수정
$ vi config.php
...
function detectCharacterEncoding($str) {
$list = array(/*'ASCII',*/ 'UTF-8', 'ISO-8859-1');
-> $list = array(/*'ASCII',*/ 'UTF-8', 'EUC-KR', 'ISO-8859-1'); // 소스 한글(EUC-KR)
...
5. 인증은 apache의 기본인증을 사용하기 위해 passwd 설정
$ htpasswd -c /etc/httpd/conf/websvn-auth.conf apollo89
6. httpd.conf 설정
$ cd /etc/httpd/conf
$ vi httpd.conf
...
# http 를 이용한 subversion 접근
<location /svn/<프로젝트명>>
DAV svn
SVNPath /svnrepos/< 프로젝트폴더>
AuthType Basic
AuthName "SVN"
AuthUserFile /etc/httpd/conf/websvn-auth.conf
Require valid-user
</location>
# websvn UI 접근
Alias /websvn /var/www/websvn
<directory /var/www/websvn>
Options Indexes MultiViews
AuthType Basic
AuthName "Web SVN"
AuthUserFile /etc/httpd/conf/websvn-auth.conf
Require valid-user
</directory>
...
7. apache 재구동
]# /sbin/service httpd restart
httpd 를 정지 중: [ OK ]
httpd (을)를 시작 중: Syntax error on line 932 of /etc/httpd/conf/httpd.conf:
Unknown DAV provider: svn
[실패]
허거덕!
DAV모듈이 없나보다..
DAV 모듈을 설치해준다.
# yum -y install mod_dav_svn
httpd.conf 에 dav모듈 load
LoadModule dav_svn_module modules/mod_dav_svn.so
재구동 하고 웹접속해서 잘되는지 확인~
참고 : http://lesstif.tistory.com/237