InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Ubuntu tutorials

  • How to add a user on Linux with sudo access
  • How to check if a user has password on Linux
  • How to install ViewVC for svn repository on Ubuntu Linux
  • How to setup ssl (https) for your site on Ubuntu Linux
  • Install rabbitmq on Ubuntu Linux
  • LXC (Linux Containers) - quick start tutorial on Ubuntu
  • Linux - command to check swap size
  • Linux - how to add a user using useradd
  • Linux - how to create a large file like 1GB
  • Linux - how to create swap partition
  • Linux - how to remove user from a group
  • Linux - number of cpus (lscpu)
  • Linux du - find disk usage of directories or files
  • NFS client and server handy commands
  • Setup svn repository on AWS Ubuntu with apache auth
  • Ubuntu - check if a service is upstart based
  • Ubuntu - dpkg and apt-get beginner tutorial
  • Ubuntu - find file to package
  • Ubuntu - find where will a package be installed from
  • Ubuntu - how to auto start services on boot using update-rc.d (sysv init)
  • Ubuntu - how to find boot autostart status of a service
  • Ubuntu - reload iptables rules during boot
  • Use x2go to access remote Ubuntu Linux
 
  • Home
  • > Tutorials
  • > Linux

How to install ViewVC for svn repository on Ubuntu Linux

By admin | Last updated on Mar 29, 2016

ViewVC is a browser interface for cvs and subversion version control repositories. If you are using svn then its a great tool to browse your source code, see history and diffs of multiple file versions.

Here are the steps to setup ViewVC on Ubuntu Linux with Apache2 installed. These instructions assume that you have installed and setup svn already.

  1. First install viewvc package.
    sudo apt-get install viewvc
  2. These are the steps to install a test repository at /svn/repos/repo1
    sudo mkdir /svn
    sudo chown www-data /svn
    sudo -u www-data mkdir /svn/repos
    sudo -u www-data svnadmin create /svn/repos/repo1

    This will create an empty repository at /svn/repos/repo1. It should be owned by www-data as Apache runs as www-data and should be able to write here. I have also created file1.txt (2 revisions) and file2.txt in repo1 by checking out the source code.

  3. Change Apache conf file corresponding to svn and add these lines:
    Alias /viewvc-static /usr/lib/python2.4/site-packages/viewvc/templates-contrib/newvc/templates/docroot
    ScriptAlias /viewvc /usr/lib/viewvc/cgi-bin/viewvc.cgi

    This will setup http://yoursvnserver.com/viewvc as url for browsing repository.

  4. Add this config entry to /etc/viewvc/viewvc.conf at appropriate place:
    svn_roots = repo1: /svn/repos/repo1

    You can also add multiple svn repositories here by separating them with “,”. e.g.

    svn_roots = repo1: /svn/repos/repo1, repo2: /svn/repos/repo2
  5. Check if cgi module is enabled/loaded
    $ apache2ctl -M | grep cgi
     cgi_module (shared)
    

    If it is not loaded, then run the following to enable it (Thanks Eric for the suggestion):

    $ sudo a2enmod cgi
    
  6. Restart apache
    $ sudo service apache2 restart
    

    Now browse  http://yoursvnserver.com/viewvc. Here is what you should see in ui:
    svn-viewvc-home-page

  7.  Click on repo1 and you should see files as shown below:
    svn-viewvc-dir-file-listPlease note that you must have created these files (using svn) as mentioned above so that they can appear here as list.
  8. Clic on file1 and assuming we did two checkins on this file, here is how revision history should appear:
    svn-viewvc-file-revision-logs
  9. If you click on “Diff to previous 1” then the diff ui will appear as shown below:
    svn-viewvc-file-revisions-diff

 

ViewVC is a great ui tool and probably indispensable if you are using svn or cvs for source code version control.  Even though you can achieve most of the viewvc functionaries using command line svn command, but viewvc ui is lot more convenient for source code browsing.

Suggested posts:

  1. How to use ssh port forwarding to surf a site from different location
  2. Why and how to log Content-Type in apache access log
  3. WordPress – query to dump all categories
  4. PHP echo – comma (,) vs dot (.) performance benchmarks
  5. Amazon Linux 2 install apache 2.4
  6. Bash – variables in double quotes vs without quotes
  7. How to set up google analytics profiles for domain and sub-domain tracking
  8. jQuery toggleClass() examples
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Linux, Tutorials, Ubuntu Linux
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress