SVN installation (Linux VPS/Cloud) Apache 2.4
- Via SSH on your server execute the following command to install SVN:
# yum install ea-apache24-devel subversion
- 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:
http://www.webdav.org/neon/neon-0.28.4.tar.gz
tar -xzvf neon-0.28.4.tar.gz cd neon-0.28.4 ./configure --prefix=/usr/local/neon
- Install and configure SVN. Execute the commands via SSH:
`wget https://archive.apache.org/dist/subversion/subversion-1.13.0.tar.bz2
tar xfj subversion-1.13.0.tar.bz2
wget http://www.sqlite.org/sqlite-amalgamation-3.7.0.tar.gz
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`
- Configure the subversion.
Execute:
./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
`make install
mv /usr/local/libexec/mod_authz_svn.so /etc/apache2/modules/
mv /usr/local/libexec/mod_dav_svn.so /etc/apache2/modules/`
Add:
LoadModule dav\_svn\_module /etc/apache2/modules/mod\_dav\_svn.so LoadModule authz\_svn\_module /etc/apache2/modules/mod\_authz\_svn.so
in /etc/apache2/conf.d/includes/pre\_main\_global.conf
/scripts/restartsrv\_httpd
- 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.
- 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
- Adding SVN users:
htpasswd -cmd /home/user/directory/repository/conf/auth username
- Access the svn using link http://domain.com/svn
Updated 4 months ago