SVN installation (Linux VPS/Cloud) Apache 2.4 Print

  • 0

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

# yum install ea-apache24-devel subversion

2. 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

3. 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

4. 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/
LoadModule authz_svn_module /etc/apache2/modules/

in /etc/apache2/conf.d/includes/pre_main_global.conf


5. 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.

6. 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"

<Location /svn>
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

7. Adding SVN users:

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

8. Access the svn using link

Was this answer helpful?

« Back