Installing Subversion with cPanel

viptexting

Well-Known Member
Sep 19, 2005
74
0
156
I want to install subversion on my testing server to host a few repos I currently store locally, just in case something happens I'll then have a remote backup (and a NAS backup of the backup!).

I've looked on google and there are a few guides, but they seam to be geared towards cPanel <11 as they mention no Apache 2 support with cPanel (which is obviously not the case for about 6 months now).

What I am thinking of doing is as follows:

1. Rebuild Apache, including the required DAV modules.
2. Compile the mod_svn module.
3. Modify the httpd.conf to work with SVN.
4. Run the config distiller to save my modified httpd.conf.

I'm wondering if anyone has tried this, if it works ok etc without having to have a separate Apache install and using mod_proxy to access the SVN.
 

viptexting

Well-Known Member
Sep 19, 2005
74
0
156
Well I gave it a go, so far so good...

I initially removed the subversion which was already installed with CentOS, and compiled/installed subversion 1.4.6 however this broke the client, so I reinstalled the CentOS package and built/installed 1.4.2 just to be safe and avoid further issues.

I added the LoadModule lines to the 2.2.8 pre main file from WHM, restarted Apache, all seems well - DAV/2 SVN/1.4.2 is now listed in the server sig. :)
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,488
35
208
cPanel Access Level
DataCenter Provider
Make sure you wrap any subversions directives in

<IfModule> statements


I'd imagine you'd want <IfModule mod_dav_svn.c> to be exact.
 

shacker23

Well-Known Member
Feb 20, 2005
263
1
168
Get the correct subversion version

I've been wrestling with this all day on a CentOS 5.1 system, but getting strange db_create errors when trying to load

Code:
LoadModule dav_svn_module /usr/lib64/httpd/modules/mod_dav_svn.so
into the apache include editor. Couldn't find any good solutions here or in Google. Seemed to be related to DB4 (Berkeley DB) compatibility, but couldn't figure out how or what. Finally hit on the solution and thought I'd share.

Turns out the versions of subversion and mod_dav_svn that are available through the official CentOS yum repos are compiled against BerkeleyDB, but that doesn't work. Fortunately svn can fall back on other storage systems. To fix:

1) Remove subversion and mod_dav_svn via yum:

Code:
yum erase subversion
yum erase mod_dav_svn
2) Go to http://subversion.tigris.org/ and from there to binary RPM downloads section. You'll see this notice:

WARNING: The Red Hat Enterprise Linux 3 Subversion 1.2 and later RPMs above (from David Summers) are not compiled with Berkeley DB support (All other versions are compiled with Berkeley BDB support).
Aha! Exactly what you need. Navigate to the downloads for your OS and CPU (in my case this).

Download rpms for subversion and mod_dav_svn to /usr/local/src or somewhere, then install them with yum, bypassing the repos, e.g.:

Code:
yum localinstall ./subversion-1.4.6-1.rhel5.x86_64.rpm 
yum localinstall ./mod_dav_svn-1.4.6-1.rhel5.x86_64.rpm
Now you should be able to load the module into the apache editor:

Code:
LoadModule dav_svn_module /usr/lib64/httpd/modules/mod_dav_svn.so
Worked for me anyway.
 

shacker23

Well-Known Member
Feb 20, 2005
263
1
168
One more note: If yum complains that the package is not signed and then exits silently, edit /etc/yum.conf and set:

gpgcheck=1

to

gpgcheck=0

Then try again. Remember to restore the setting when you're done for security.
 

blargman

Well-Known Member
Verifed Vendor
Sep 11, 2007
99
0
56
grab the latest subversion source

./configure --with-apxs=/usr/local/apache/bin/apxs --with-apr=/usr/local/apache --with-apr-util=/home/cpeasyapache/src/httpd-2.2.8/srclib/apr-util

make
make install

replace 2.2.8 with whatever current httpd source your using.
works for me, used it on several machines.