SVN server integrated with LDAP
Softwares
apache_2.0.59
svn-win32-1.4.0
Directory SDK for C 5.08
mm_mod_auth_ldap
*Warning*:
mod_dav_svn binaries available are NOT compatible with Apache 2.2
apache own module mod_auth_ldap dose not work well under windows system and always lead the server to crash, so we use a third party module: mm_mod_auth_ldap
Installation
Install apache
{code}
# tar xvzf httpd-2.0.59.tar.gz
# cd httpd-2.0.59/
# ./configure --enable-dav --enable-so --prefix=/path/to/apache2
# make
# make install
{code}
Install svn
{code}
# tar xvzf subversion1.4.0.tar.gz
# cd subversion1.4.0/
# ./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2
#make
#make install
{code}
Install LDAP C SDK
{code}
# tar xzvf ldap*** to /usr/local/iplanet
{code}
Install mod_auth_ldap (a thirdparty software for apache2.*)
{code}
# tar xvzf mod_auth_ldap
# cd mod_auth_ldap/
# ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-ldap-dir=/usr/local/iplanet
# make
# make install
{code}
create svn root and import
configure httpd.conf
{code}
DAV svn
SVNPath %svn_module_path%
AuthType Basic
AuthName "welcome and plz login"
Bind_Tries 2
Order allow,deny
Allow from all
AuthLDAPAuthoritative on
LDAP_Server ***
LDAP_Port 389
LDAP_Protocol_Version 3
Base_DN OU=**,DC=**,DC=**
Bind_DN "cn=**,cn=**,dc=***"
Bind_Pass ***
UID_Attr sAMAccountName
require valid-user
{code}
*NOTE*
Make sure to update LD_LIBRARY_PATH env variable to include LDAP C SDK lib directory in path_apache2/bin/envvars file or directly in path_apache2/bin/apachectl start-up script.
Enchanced by viewVC
subversion 1.3.2
viewVC 1.0.3
python2.3 (maybe it's preinstall on your os and note that version 2.4 is not supported)
Installation and Configuration
* Install Python Bindings for subversion
{code}
cd to the source folder of subversion
./configure --prefix=/usr/local/viewvc-1.0.3
make swig-py
make install-swig-py
{code}
* Install viewvc
{code}
unzip viewvc-1.0.3.zip
cd to viewvc source folder
python viewvc-install
{code}
* Configure viewvc
Following the prompt when finishing installing viewvc
Please make sure no error when type following commands:
{code}
python
>>import svn.repos
{code}
If have, do:
{code}
make new file "subversion.pth" under "/usr/lib/python2.3/site-packages/"
echo /usr/local/lib/svn-python > /usr/lib/python2.3/site-packages/subversion.pth
{code}
* Configure Apache
# vi httpd.conf
add followings:
{code}
ScriptAlias /viewvc "/usr/local/viewvc-1.0.3/bin/cgi/viewvc.cgi"
ScriptAlias /query "/usr/local/viewvc-1.0.3/bin/cgi/query.cgi"
{code}
_viewvc_ and _query_ is the part URL after "http://localhost/" which can be customized by yourself
# integrat LDAP authentication, add this code to httpd.conf:
{code}
Options Indexes FollowSymLinks
AllowOverride None
order allow,deny
allow from all
AuthName "login viewvc for svn-repository"
AuthType Basic
LDAP_Server ***
LDAP_Port 389
Base_DN ****
Bind_DN ***
Bind_Pass ***i
UID_Attr sAMAccountName
Require valid-user
{code}
# restart apache
web browser open: [http://localhost/viewvc]
Softwares
apache_2.0.59
svn-win32-1.4.0
Directory SDK for C 5.08
mm_mod_auth_ldap
*Warning*:
mod_dav_svn binaries available are NOT compatible with Apache 2.2
apache own module mod_auth_ldap dose not work well under windows system and always lead the server to crash, so we use a third party module: mm_mod_auth_ldap
Installation
Install apache
{code}
# tar xvzf httpd-2.0.59.tar.gz
# cd httpd-2.0.59/
# ./configure --enable-dav --enable-so --prefix=/path/to/apache2
# make
# make install
{code}
Install svn
{code}
# tar xvzf subversion1.4.0.tar.gz
# cd subversion1.4.0/
# ./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apache2 --with-apr-util=/usr/local/apache2
#make
#make install
{code}
Install LDAP C SDK
{code}
# tar xzvf ldap*** to /usr/local/iplanet
{code}
Install mod_auth_ldap (a thirdparty software for apache2.*)
{code}
# tar xvzf mod_auth_ldap
# cd mod_auth_ldap/
# ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-ldap-dir=/usr/local/iplanet
# make
# make install
{code}
create svn root and import
configure httpd.conf
{code}
DAV svn
SVNPath %svn_module_path%
AuthType Basic
AuthName "welcome and plz login"
Bind_Tries 2
Order allow,deny
Allow from all
AuthLDAPAuthoritative on
LDAP_Server ***
LDAP_Port 389
LDAP_Protocol_Version 3
Base_DN OU=**,DC=**,DC=**
Bind_DN "cn=**,cn=**,dc=***"
Bind_Pass ***
UID_Attr sAMAccountName
require valid-user
{code}
*NOTE*
Make sure to update LD_LIBRARY_PATH env variable to include LDAP C SDK lib directory in path_apache2/bin/envvars file or directly in path_apache2/bin/apachectl start-up script.
Enchanced by viewVC
subversion 1.3.2
viewVC 1.0.3
python2.3 (maybe it's preinstall on your os and note that version 2.4 is not supported)
Installation and Configuration
* Install Python Bindings for subversion
{code}
cd to the source folder of subversion
./configure --prefix=/usr/local/viewvc-1.0.3
make swig-py
make install-swig-py
{code}
* Install viewvc
{code}
unzip viewvc-1.0.3.zip
cd to viewvc source folder
python viewvc-install
{code}
* Configure viewvc
Following the prompt when finishing installing viewvc
Please make sure no error when type following commands:
{code}
python
>>import svn.repos
{code}
If have, do:
{code}
make new file "subversion.pth" under "/usr/lib/python2.3/site-packages/"
echo /usr/local/lib/svn-python > /usr/lib/python2.3/site-packages/subversion.pth
{code}
* Configure Apache
# vi httpd.conf
add followings:
{code}
ScriptAlias /viewvc "/usr/local/viewvc-1.0.3/bin/cgi/viewvc.cgi"
ScriptAlias /query "/usr/local/viewvc-1.0.3/bin/cgi/query.cgi"
{code}
_viewvc_ and _query_ is the part URL after "http://localhost/" which can be customized by yourself
# integrat LDAP authentication, add this code to httpd.conf:
{code}
Options Indexes FollowSymLinks
AllowOverride None
order allow,deny
allow from all
AuthName "login viewvc for svn-repository"
AuthType Basic
LDAP_Server ***
LDAP_Port 389
Base_DN ****
Bind_DN ***
Bind_Pass ***i
UID_Attr sAMAccountName
Require valid-user
{code}
# restart apache
web browser open: [http://localhost/viewvc]