I set up a Subversion repository on Dreamhost today. Anyone who knows Subversion knows (or should know) that ViewVC is the perfect complement. It provides a web interface for browsing your Subversion repository, looking at new and old versions of files, diffs of changes, etc.
So naturally, once I got Subversion all set up, I wanted to set up ViewVC as well. Unfortunately, though, while the Subversion section of Dreamhost's wiki is very informative and helpful, the ViewVC section leaves quite a bit to be desired.
I wasn't phased by the lacking documentation, though, and believe it or not, I was able to get ViewVC up-and-running on my Dreamhost server in no time. The following is a run-through of what I did, in case anyone else finds it useful.
Downloading ViewVC
At the time of writing, the latest version of ViewVC is version 1.0.7. I found the link to the zipped tarball and then downloaded it directly onto my web server, like so:
wget http://viewvc.tigris.org/files/documents/3330/44050/viewvc-1.0.7.tar.gz
Installing ViewVC
Once I decompressed and extracted the files from the downloaded package, I executed the installation script from within the extracted folder like so:
./viewvc-install
When prompted for the installation path, I initially tried to just use the default (/usr/local/viewvc-1.0.7), but I didn't have the proper permissions for that (understandably so), so I created a new directory on my webserver at /home/<myusername>/tools and then chose /home/<myusername>/tools/viewvc-1.0.7 as the installation path to use. I stuck with the default setting for the DESTDIR path option, and next thing I knew, all of the files were being installed.
Configuring ViewVC
Once everything was installed, the script instructed me to update the viewvc.conf file in the directory I just installed everything to. I left mostly everything in the file untouched, but made the following changes:
- Commented out the
cvs_rootsoption since I'm using ViewVC for a Subversion repository and not a CVS repository - Uncommented the
svn_rootsoption for the same reason, and pointed it to my recently created repository (svn_roots = svn: /home/<myusername>/svn/<myprojectname) - Commented out the line
default_root = cvsand added a new line beneath it that looked the same, but usingsvninstead ofcsv
Making ViewVC Web-accessible
The next thing the script instructed me to do was to configure my web server in such a way that ViewVC would be accessible via the web. It gave a few options, but the simplest one seemed to be copying the viewvc.cgi script from its install location (/home/<myusername>/tools/viewvc-1.0.7/bin/cgi/viewvc.cgi) to the root of the subdomain I created when setting up Subversion (and taking heed to some important advice). Once I did that, I could see the ViewVC interface in my web browser at the aforementioned subdomain.
Keeping Love ViewVC Locked Down
At this point, I had pretty much accomplished my initial task, which was to get ViewVC working with my new Dreamhost Subversion repository, but I also wanted to make sure that not just any regular Joe the Plumber off the street could access my repository and see what evil deeds I've been up to.
Fortunately for me, much like Dreamhost's Subversion setup instructions and much unlike their ViewVC documentation, their information on password-protecting directories is useful and pointed me directly to the control panel interface for managing the password-protection settings and allowed me to set up usernames and passwords authorized to view my new ViewVC interface.
Comments
Thanks. These instructions were a great starting point for my own setup. I wrote up some extra info about how to set up more convenient URLs for repository content and a few other configuration tweaks to make it look nicer and work faster.
Post Comments
If you feel like commenting on the above item, use the form below. Your email address will be used for personal contact reasons only, and will not be shown on this website.
Awesome, thanks for sharing. Provided i have time i think i'll give this ago this weekend.
Permalink