[{TableOfContents}]

!!!참고 URL
*[pyrasis| http://www.pyrasis.com/main/Subversion-HOWTO#s-2.2]

!!!필수 유틸 설치
{{{
#yum install
yum install apr*
yum install neon*

#직접 컴파일 설치
wget http://www.webdav.org/neon/neon-0.28.0.tar.gz
tar xvfz neon-0.28.0.tar.gz # 압축을 풀고 
cd neon-0.28.0 
./configure --with-ssl 
make 
make install 
cd ..

wget http://archive.apache.org/dist/apr/apr-1.2.12.tar.gz
tar xvfz apr-1.2.12.tar.gz 
cd apr-1.2.12
./configure 
make 
make install 
cd ..

wget http://archive.apache.org/dist/apr/apr-util-1.2.12.tar.gz 
tar xvzf apr-util-1.2.12.tar.gz
cd apr-util-1.2.12
./configure --with-apr=/usr/local/apr 
make 
make install 
cd ..

#/usr/lib/libexpat.so: could not read symbols: File in wrong format 에러발생시
#rm -rf /usr/lib/libexpat.so
#ln -s /lib64/libexpat.so.0.5.0 /usr/lib/libexpat.so
}}}

!!!subversion 1.6.x 설치
*openssl, apache가 설치 되어 있어야함
*apache 모듈에 mod_dav가 설치돼어 있어야 아파치와 연동해서 사용 할 수 있음
{{{
wget http://subversion.tigris.org/downloads/subversion-1.6.3.tar.gz 
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.3.tar.gz
tar -xvzf subversion-1.6.3.tar.gz
tar -xvzf subversion-deps-1.6.3.tar.gz
cd subversion-1.6.3
./configure --with-ssl=/usr/local/ssl --with-ssl --with-apxs=/usr/local/apache2/bin/apxs
make && make install
}}}



!!!아파치 환경 설정(모듈 설정)
*아래의 구문이 설정 되었는지 체크
{{{
vi /usr/local/apache2/conf/httpd.conf
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
}}}

!!!저장소 생성
{{{
mkdir -p /rcs/svn/
svnadmin create --fs-type fsfs /rcs/svn/sample
chmod -R g+w /rcs/svn
chown -R daemon.daemon /rcs/svn
}}}

!!!아파치 환경 설정(저장소 설정과 권한)
{{{
vi /usr/local/apache2/conf/httpd.conf
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<Location /svn>
    DAV svn
    SVNParentPath /rcs/svn/

    # our access control policy
    AuthzSVNAccessFile /rcs/svn-access-file

    # only authenticated users may access the repository
    Require valid-user

    #how to authenticate a user
    AuthType Basic
    AuthName "Subversion Repository"

    # user file which is created by htpasswd utility
    AuthUserFile /rcs/svn-auth-file
</Location>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
}}}

!!!아파치 유저 설정
{{{{
(-c옵션을 빼면 사용자가 추가 된다. 물론 권한 파일이 있어야 한다.)
/usr/local/apache2/bin/htpasswd -c /rcs/svn-auth-file sample
}}}

!!!아파치에 설정된 ACL 파일의 설정
{{{
vi /rcs/svn-access-file
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#[groups] : 사용자 그룹명과 사용자설정한다.
#[레파지토리명:/특정디렉토리] : 레파지토리와 그 이하 특정 디렉토리에 사용자 그룹 또는 사용자의 접근 권한을 할당한다.
#그룹명 앞에는 반드시 @표시를 넣어주며 그렇지 않은 경우는 유저이름으로 간주한다.

#r  --> 읽기 권한
#w  --> 쓰기 권한
#rw --> 읽기/쓰기 권한

[groups]
observer = test
developer = sample

[sample:/]
@developer = rw
@observer = r

#디렉토리별 권한
[sample:/bin] 
@design = rw
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
}}}

!!!접속 테스트
{{{
htp://www.xxxx.com/svn/sample
}}}