Tags

, ,

1. Install WebSVN:

# apt-get install websvn

When asked for the “svn parent repositories” change the path to be: /var/lib/rancid/svn. Do the same when asked about “svn repositories”

2. Fix permissions. The web server must be able to read the SVN (Subversion) folder

# chgrp -R www-data /var/lib/rancid/svn
# chmod g+w -R /var/lib/rancid/svn

3. Change ownership of web files

# chown www-data:www-data /usr/local/websvn

4. Edit websvn configuration file:

# vi /usr/share/websvn/include/config.php
$config->addRepository(‘Routers’, ‘file:///var/lib/rancid/svn/’);

5. Add the following virtual host entry to your apache configuration file /etc/apache2/sites-enabled/000-default

# vi /etc/apache2/sites-enabled/000-default

Alias /websvn /usr/share/websvn
DirectoryIndex index.php
Options FollowSymLinks
deny from all
AllowOverride AuthConfig
Order deny,allow

php_flag magic_quotes_gpc Off
php_flag track_vars On

6. Reload apache and try to browse the websvn: http://hostname/websvn

Bellow is the screenshot how webSVN look like:

image

If you get error ““/var/lib/rancid/CVS/db/uuid’: Permission denied” the CVS directory is owned by the user rancid:rancid” try the following:

# usermod -a -G rancid www-data