Installing and Configuring Subversion (SVN) on BlueHost VPS Server (CentOS)
My all steps are just follow up of this beautiful wiki article at http://wiki.centos.org/HowTos/Subversion . The article has overall 8 steps, however for installation on BlueHost VPS an expansion is required for step 3 and step 4.2
Step 3 - While installing
yum install mod_dav_svn subversion it will give error
Error: Missing Dependency: httpd-mmn = 20051115 is needed by package mod_dav_svn
To resolve it kindly do following steps
[$] find / -name "yum.conf" --- Note the path
[$] vim /path/yum.conf --- Edit the file
httpd* from the following line
exclude=apache* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*
Save the and exit the file
[$] yum install mod_dav_svn subversion --- If Success, then you can revert back yum.conf file to its original.
Step 4 - Before proceeding to this step kindly create a domain or subdomain (svn.domain.com) preferable,
and assign it to any folder (mostly /home/username/public_html/svn.domain.com)
/home/username/public_html/svn.domain.com --- will be main folder under which I will have many repositories (not just one, but many)
Step 4.1 - Skip this step from the article, as BlueHost will take its care
Step 4.2 - By default Subversion will create a .conf file named as
For BlueHost, any files in this path are in-effective (took me four hours to figure out)
because it uses C-Panel which has it own requirement to follow -> http://docs.cpanel.net/twiki/bin/view/EasyApache3/InsideVHost
So edit the
/etc/httpd/conf/httpd.conf file in your favourite edit
[$] vim /etc/httpd/conf/httpd.conf` --- Edit the main Apache config file
[Editor] /svn.domain.com --- Hit Enter and search for your domain configurations, scroll through up or down keys or n for next hit
Just above the for svn.domain.com you will come across something similar to below lines
# To customize this VirtualHost use an include file at the following location
Uncomment the Include by remove the hash (#) at the beginning and
Copy the path between the Include until *.conf (remove *.conf) and paste as below in
[$] mkdir -p /usr/local/apache/conf/userdata/std/2/username/svn.domain.com/ --- Creates all parents directory as well if they don't exist
[$] vim /usr/local/apache/conf/userdata/std/2/username/svn.domain.com/subversion.conf --- Create subversion configuration file
subversion.conf file while in edit mode (press i) paste the below
and kindly change the path of
AuthUserFile as required
Kindly note that DocumentRoot in VirtualHost configs and SVNParentPath in subversion.conf cannot have same directory path. SVNParentPath must supersede or be in located in different directory altogether, it cannot be under DocumentRoot path.
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
AuthName "DFR Visualization Images Repository"
:wq! and save and exit the file.
Now execute below commands to create the authentication file in the path mentioned in
AuthUserFile variable in subversion.conf file
In htpasswd command use -cm argument for first time creation of users and for subsequent users just use -m, else previous users data will be lost
[$] htpasswd -cm /home/username/public_html/svn.domain.com/svn-auth-conf username --- Press enter and input password
One more last step.
By Default Subversion installs the modules required to load for SVN to work properly in proper directory, but because BlueHost uses C-Panel it has different directory for same purpose, which Subversion will not realise.
Therefore we need to manually copy the Subversion modules installed in default module directory to C-Panel's modules directory.
First find where the Subversion has installed following two modules which we specified in subversion.conf file
[$] find / -name "mod_dav_svn.so" --- Find and note subversion installation path
[$] find / -name "mod_authz_svn.so" --- Find and note subversion installation path
Copy them to C-Panel modules folder (generally
/usr/local/apache/modules/), kindly verify the path before copying.
[$] cp /subversion_modules_path/mod_dav_svn.so /usr/local/apache/modules/
[$] cp /subversion_modules_path/mod_authz_svn.so /usr/local/apache/modules/
Now Login to your C-Panel of bluehost and Restart the Apache Service located at
C-Panel -> WHM -> Restart Services -> HTTP Server (Apache)
Follow the rest steps as in the article.