The combination of SVN and LDAP, viewed with viewvc

Source: Internet
Author: User
Tags ldap samaccountname
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 --- 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]
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.