Installation #
- Check if
sqlite
andmod_dav
are installed/provisioned
php -m | grep sqlite
httpd -M | grep dav
If they’re already installed you should get something like the following:
root@server [/]# php -m | grep sqlite && httpd -M | grep dav
pdo_sqlite
sqlite3
dav_module (shared)
* Using EA4 or `yum` install/provision the `sqlite` PHP module and `mod_dav`
extension for Apache if not already installed
* `yum install ea-apache24-mod_dav`
-
cd /usr/local/src/
-
Get the latest release of Subversion from the downloads page
wget https://downloads.apache.org/subversion/subversion-1.14.1.tar.gz
- Unzip it.
tar xvzf subversion-1.14.1.tar.gz
-
cd subversion-1.14.1
-
You probably need to install these dependencies
yum install epel-release ea-apr-devel ea-apr-util-devel lz4-devel utf8proc-devel ea-apache24-devel
- Get other dependencies
./get-deps.sh
- Configure
./configure --with-apxs=/usr/bin/apxs --with-apr=/opt/cpanel/ea-apr16/bin/apr-1-config --with-apr-util=/opt/cpanel/ea-apr16/bin/apu-1-config
- make and install
make clean
make
make install
- Add LoadModules to WHM » Apache Configuration » Pre-Main Include » All
Versions, or by editing
/etc/apache2/conf.d/includes/pre_main_global.conf
LoadModule dav_svn_module /usr/local/libexec/mod_dav_svn.so
LoadModule authz_svn_module /usr/local/libexec/mod_authz_svn.so
Rebuild apache conf and restart apache
Test #
- Get location of user confs for apache
cat /usr/local/apache/conf/httpd.conf | grep /etc/apache2/conf.d/userdata
- Make dir where you’re going to put your SVN conf
mkdir -p /etc/apache2/conf.d/userdata/std/2_4/cpuser/example.com/
- Make SVN conf by creating and editing the following file using your favorite text editor:
/etc/apache2/conf.d/userdata/std/2_4/cpuser/example.com/svn.conf
Insert the following adjusting cpuser
etc.
SecRuleRemoveById 960013
SecRuleRemoveById 960032
<IfModule mod_dav_svn.c>
<Location /svn>
DAV svn
SVNPath /home/cpuser/public_html/svn
</Location>
</IfModule>
- Update apache conf
/scripts/ensure_vhost_includes –all-users
service httpd restart
- Create repository files
switch cpuser
cd public_html/
svnadmin create svn
chmod 775 -R svn/
- View test page http://example.com/svn
See Also #
https://forums.cpanel.net/threads/svn-install-on-centos-7-ea4.613563/ https://forums.cpanel.net/threads/location-path-for-apr-util-apr-1-config-using-ea4.608959/#post-2471127