'1.6'에 해당되는 글 1건

  1. 2016.08.07 httpd 에 SVN Repository 구축하기

CentOS 6.7 에서 SVN Repository 를 구축하고 http 로 접속한다.

<PROJECT>, <USERNAME>, <PASSWORD> 는 각자에 맞게 설정한다


# root 로 작업


# 1.7 로 할 경우만 설치

wget http://opensource.wandisco.com/rhel/6/svn-1.7/RPMS/x86_64/mod_dav_svn-1.7.22-1.x86_64.rpm

wget http://opensource.wandisco.com/rhel/6/svn-1.7/RPMS/x86_64/subversion-1.7.22-1.x86_64.rpm

wget http://opensource.wandisco.com/rhel/6/svn-1.7/RPMS/x86_64/subversion-tools-1.7.22-1.x86_64.rpm


# 1.6 으로 할 경우

yum install subversion mod_dav_svn


mkdir -p /var/www/svn/repos

cd /var/www/svn/repos

svnadmin create --fs-type fsfs <PROJECT>


vim /etc/httpd/conf.d/subversion.conf

# WANdisco Subversion Configuration

# For more information on HTTPD configuration options for Subversion please see:

# http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html

# Please remember that when using webdav HTTPD needs read and write access your repositories.


# Needed to do Subversion Apache server.

LoadModule dav_svn_module modules/mod_dav_svn.so

# Only needed if you decide to do "per-directory" access control.

LoadModule authz_svn_module modules/mod_authz_svn.so

# 2016-08-07 hskimsky add

SVNAdvertiseV2Protocol Off


<Location /svn/repos>

  DAV svn

  # SVNPath /opt/repo/

  SVNParentPath /var/www/svn/repos

  ### /svn 로 access 할 경우 Repository 를 List 를 보여주려면 on 으로 설정한다.

  SVNListParentPath on

  AuthType Basic

  AuthName "SVN Repo"

  AuthUserFile /var/www/svn/conf/svn.passwd

  Require valid-user

  ## Path-Based Authorization 를 사용할 경우 설정한다.

  AuthzSVNAccessFile /var/www/svn/conf/svn-access-file

</Location>


mkdir -p /var/www/svn/conf


touch /var/www/svn/conf/svn.passwd

htpasswd -b /var/www/svn/conf/svn.passwd <USERNAME> <PASSWORD>


vim /var/www/svn/conf/svn-access-file

[<PROJECT>:/]

* = r

@admin = rw

@<PROJECT>-developers = rw


[groups]

<PROJECT>-developers = hskimsky

admin = hskimsky


chown -R apache:apache /var/www/svn


아래 URL 접속하고 위에서 입력한 USERNAME, PASSWORD 입력하고 보이면 성공!

http://<SERVER>/svn/repos/<PROJECT>



참고

http://zetawiki.com/wiki/CentOS_%EC%84%9C%EB%B8%8C%EB%B2%84%EC%A0%84_%EC%84%9C%EB%B2%84_%EC%84%A4%EC%B9%98_%EB%B0%8F_%EC%84%A4%EC%A0%95_(svn)#cite_ref-2

Posted by FeliZ_하늘..

댓글을 달아 주세요