SVN installation (Linux VPS/Cloud) Apache 2.4

  1. Via SSH on your server execute the following command to install SVN:  

# yum install ea-apache24-devel subversion

  1. Check if dav modules are loaded:

`/etc/init.d/httpd -M | grep dav

dav_module (static)
dav_fs_module (static)
dav_lock_module (static)
dav_svn_module (shared)`

If this modules are missing you need to add it from WHM-> Easyapache4.

Also make sure whether neon installed or not, if not installed:

tar -xzvf neon-0.28.4.tar.gz cd neon-0.28.4 ./configure --prefix=/usr/local/neon

  1. Install and configure SVN. Execute the commands via SSH:


tar xfj subversion-1.13.0.tar.bz2
tar -zxvf sqlite-amalgamation-3.7.0.tar.gz
cd subversion-1.13.0
mkdir sqlite-amalgamation
cp /usr/src/sqlite-3.7.0/sqlite3.c /usr/src/subversion-1.6.3`

  1. Configure the subversion.


./configure --with-apr=/opt/cpanel/ea-apr16/bin/apr-1-config --with-apr-util=/opt/cpanel/ea-apr16/bin/apu-1-config --with-apxs=/usr/bin/apxs --with-neon=/usr/local --with-lz4=internal


`make install

mv /usr/local/libexec/ /etc/apache2/modules/
mv /usr/local/libexec/ /etc/apache2/modules/`


LoadModule dav\_svn\_module /etc/apache2/modules/mod\_dav\ LoadModule authz\_svn\_module /etc/apache2/modules/mod\_authz\

in /etc/apache2/conf.d/includes/pre\_main\_global.conf


  1. Create SVN for cpanel user:

`mkdir -v /home/user/directory/repository

/usr/bin/svnadmin create --fs-type fsfs /home/user/directory/repository`

That should create a subversion repository under /home/user/directory/repository.

  1. Fix permissions for the created directory:

chown -R user:nobody /home/user/dir/repository chmod -R 770 /home/user/dir/repository

Put the following entries in /etc/apache2/conf.d/userdata/std/2\_4/user/domain/svn.conf

`Alias /svn "/home/user/directory/repository"

DAV svn
SVNPath "/home/user/directory/repository"
SVNPathAuthz Off # More faster but don't check permission permission in all parenth path ( - security)
AuthzSVNAccessFile "/home/user/directory/repository/conf/auth"
require valid-user
Satisfy Any
Options MultiViews
Require all granted


Save it.

Then run:

/scripts/ensure\_vhost\_includes --user=username

  1. Adding SVN users:

htpasswd -cmd /home/user/directory/repository/conf/auth username

  1. Access the svn using link