Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to install SVN on a cPanel server running Apache  (Read 4990 times)

0 Members and 1 Guest are viewing this topic.

akhils

  • Guest
How to install SVN on a cPanel server running Apache
« on: November 22, 2014, 06:53:52 pm »
Hi All,

Please follow the steps below to configure SVN version 1.8.10 in the cPanel server.

============================================================================
**Note: This is for a SVN installation with Basic authentication only, not per-directory access control**

#Obtain subversion
mkdir /usr/local/src/subversion/
cd /usr/local/src/subversion/

wget http://mirror.tcpdiag.net/apache/subversion/subversion-1.8.10.tar.gz
tar xzf subversion-1.8.10.tar.gz

#Obtain SQLite
wget http://www.sqlite.org/2014/sqlite-autoconf-3080702.tar.gz
tar xzf sqlite-autoconf-3080702.tar.gz

cp -prf /usr/local/src/subversion/sqlite-autoconf-3080702/* /usr/local/src/subversion/subversion-1.8.10/

cd /usr/local/src/subversion/subversion-1.8.10/

#Configure SVN
./configure –with-apxs=/usr/local/apache/bin/apxs –with-apr=/usr/local/apache/bin/apr-1-config –with-apr-util=/home/cpeasyapache/src/httpd-2.2/srclib/apr-util

make
make install

#Add the following to /etc/httpd/conf/httpd.conf
=====
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
=====

#Distill the Apache configuration so the modules are not removed when the configuration is rebuilt:

/usr/local/cpanel/bin/apache_conf_distiller --update

#Add the following to /etc/httpd/conf/includes/pre_virtualhost_global.conf to set up access to the repository with Basic authentication:

=====
<Location /svn>
DAV svn
SVNParentPath /svn
AuthType Basic
AuthName “Subversion repository”
AuthUserFile /etc/svn-auth.htpasswd
Require valid-user
</Location>
=====

#Below indicates how to create users for authorization:
touch /etc/svn-auth.htpasswd
/usr/local/apache/bin/htpasswd  /etc/svn-auth.htpasswd username

#Restart Apache:
/etc/init.d/httpd restart

#Create your repositories as needed:
cd /
mkdir svn
cd svn
svnadmin create –fs-type fsfs <repo_name>

#You can now access the individual repository via http://SERVERIP/svn/repo_name/ using the user credentials created previously.

A complete reference for SVN can be located at: http://svnbook.red-bean.com/en/1.7/svn-book.html
============================================================================

That's it, you just have completed the SVN configuration in a cPanel server.   ::)

Cheers.. \m/  8) \m/