Installation deployment and user authentication configuration for Subversion

Source: Internet
Author: User


Note: This example takes a subversion+apache pattern


One: Required package download

compiling svn needs to rely on the SQLite Library,RHEL5 's own RPM package version is too low, the compilation can not pass.

#wget Http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz#wget http://subversion.tigris.org/downloads/ Subversion-1.6.12.tar.bz2#wget http://archive.apache.org/dist/httpd/httpd-2.2.16.tar.gz


Second:SQLite Library compilation installation

#tar-zxvf SQLITE-AMALGAMATION-3.6.13.TAR.GZ#CD Sqlite-3.6.13/#./configure--prefix=/usr/local/sqlite#make & & Make Install


III:Apache compiled installation

#cd: /#tar-ZXVF HTTPD-2.2.16.TAR.GZ#CD httpd-2.2.16.tar.gz---Subversion is combined with Apache, you need to use the DAV module of the Apache server, when compiling Apache, Need to add--enable-dav option #./configure--prefix=/usr/local/apache--enable-dav--enable-so--enable-rewrite--enable-headers --enable-expires--enable-mods-shared=all#make&& make Install


Four:Subversion Compilation installation

#cd: /#tar-jxvf SUBVERSION-1.6.12.TAR.BZ2#CD subversion-1.6.12#./configure--prefix=/usr/local/subversion--WITH-SASL-- With-zlib=/usr/lib--with-ssl--with-sqlite=/usr/local/sqlite--with-apxs=/usr/local/apache/bin/apxs#make & & Make Install



V: Configure Apache to support subversion

1: check if Apache has compiled the DAV module:

#cat/usr/local/apache/build/config.nice "./configure" "--prefix=/home/usr/local/apache" "--enable-so" "-- Enable-rewrite ""--enable-headers ""--enable-dav "\---have DAV module"--enable-expires ""--enable-mods-shared=all "" [Emai L protected] "

2: Configure Apache master configuration file httpd.conf

Modify ServerName:

Servername localhost:80

To cancel an extension in the configuration file httpd-vhosts.conf Previous comments:

Includeconf/extra/httpd-vhosts.conf

3: Configure /usr/local/apache/conf/extra/httpd-vhosts.conf

#cat/usr/local/apache/conf/extra/httpd-vhosts.confnamevirtualhost *:80 <virtualhost *:80> DocumentRoot "/svn_ Data "ServerName 192.168.189.132 <Directory/svn_data> Order allow,deny allow from all </directory& Gt </VirtualHost> <Location/svn> DAV svn svnlistparentpath on Svnparentpath/svn_data/svnpathauthz off</ Location>

To create the/svn_data directory:

#mkdir-P/svn_data

4: start Apache service

Verify the configuration file syntax:

#/usr/local/apache/bin/apachectl-t

if it is normal, the display " Syntaxok".

When configuring Subversion+apache for the first time , the following error usually occurs:

Httpd:syntax Error Online Of/usr/local/apache2.2.15/conf/httpd.conf:cannot load/usr/local/apache2.2.15/modules/ Mod_dav_svn.so into server:/usr/local/subversion/lib/libsvn_subr-1.so.0:undefined symbol:sqlite3_open_v2

use the following method to resolve:

#echo "/usr/local/sqlite/lib" >>/etc/ld.so.conf#ldconfig

If you still cannot resolve the error using the above method, check to see if the system is up to zero , and then use the following method:

#mv/usr/lib64/libsqlite3.so.0.8.6/root/bak#ln-s/usr/local/sqlite/lib/libsqlite3.so.0.8.6/usr/lib64/ Libsqlite3.so.0.8.6#ldconfig

VI: Test Subversion

To create the SVN directory CMH:

#svnadmin create/svn_data/cmh#ls/svn_data/cmhconf db format hooks locks README.txt


Web interface Testing:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7F/22/wKiom1cUkQiBLSqhAACTzue0WlE492.png "title=" 1.png " alt= "Wkiom1cukqiblsqhaactzue0wle492.png"/>

the above interface indicates that subversion was initially configured for use.

Seven: Configure Subversion user authentication

Create a Subversion configuration directory and create a validation file:

#mkdir/usr/local/subversion/conf#cd/usr/local/subversion/conf#touch authz#cat Authz (Configure group, user, directory permissions) [groups]admin = AD Min,cmhtech = User1,user2 [cmh:/] @admin = Rw@tech = R

use the Apache htpasswd command to create a passwd file (created with -cm for the first time , followed by adding users - M ):

#/usr/local/apache/bin/htpasswd-cm/usr/local/subversion/conf/passwd CMH

Configure The/usr/local/apache2.2.15/conf/httpd.conf file to add a validation configuration under the SVN directory.

<Location/svn> DAV svn svnlistparentpathon svnparentpath/svn_data/svnpathauthz on authzsvnaccessfile/usr/l Ocal/subversion/conf/authz authname "Private Svn" AuthType Basic authuserfile/usr/local/subversion/conf/passwd Req Uire valid-user</location>

to restart Apache:

#/usr/local/apache/bin/apachectl–t#/usr/local/apache/bin/apachectl–k restart

Web authentication:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/7F/1F/wKioL1cUkjjCCyiTAAFNsuaE-HI047.png "title=" 2.png " alt= "Wkiol1cukjjccyitaafnsuae-hi047.png"/>


This article from the "Play God Clown" blog, reproduced please contact the author!

Installation deployment and user authentication configuration for Subversion

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.