====== Setting Up Subversion Apache with LADP Auth ====== ===== Install LDAP Server ===== - Apache를 이용한 인증을 사용하려면, [[dbms:ldap|LDAP]]을 먼저 설치해야 한다. - 간단하게 Apache Basic 인증을 사용할수도 있겠지만, LDAP으로 계정을 관리하면 다른 Application과 연동하는데에도 편할 것이다. ===== Install ViewVC ===== - Apache Subversion 모듈에서는 현재 리비전만 보이므로, 대안으로써 예전의 정보까지 보여주려면 ViewVC 를 사용해야 한다. - 아래와 같이 ViewVC 를 다운로드 하여 설치한다. 설치위치는 /opt/viewvc 로 한다. # cd /usr/local/src # wget http://viewvc.tigris.org/files/documents/3330/37319/viewvc-1.0.4.tar.gz # tar xvfz viewvc-1.0.4.tar.gz # cd viewvc-1.0.4 # ./viewvc-install This is the ViewVC 1.0.4 installer. It will allow you to choose the install path for ViewVC. You will now be asked some installation questions. Defaults are given in square brackets. Just hit [Enter] if a default is okay. Installation path [/usr/local/viewvc-1.0.4]: /opt/viewvc - /opt/viewvc/viewvc.conf 에서 아래와 같이 수정한다. svn_roots = projectname: /opt/svn/projectname default_root = projectname ===== Configure apache2.conf ===== - Apache 2.2 인 경우는 /etc/apache2/apache2.conf 하단에 아래와 같이 추가한다. ScriptAlias /viewvc /opt/viewvc/bin/cgi/viewvc.cgi # ScriptAlias /query /opt/viewvc/bin/cgi/query.cgi AuthType Basic AuthName "Subversion Authentication" AuthBasicProvider ldap AuthLDAPURL "ldap://127.0.0.1:389/dc=example,dc=com?uid?sub?(objectClass=*)" AuthzLDAPAuthoritative off require valid-user DAV svn SVNParentPath /opt/svn SVNListParentPath on AuthType Basic AuthName "Subversion Authentication" AuthBasicProvider ldap AuthLDAPURL "ldap://127.0.0.1:389/dc=example,dc=com?uid?sub?(objectClass=*)" AuthzLDAPAuthoritative off require valid-user - 위와 같이 하면 [[dbms:ldap|LDAP]]과 연동이 되어서 http://hostname/svn 또는 http://hostname/viewvc 로 Repository를 볼 수 있다.