I was looking for a way to have an automated search for some items I’m looking for on Craigslist, but nothing exists in Craigslist to email you daily/weekly for items matching a particular string. I found a few websites that offered this functionality via an application, but I’m not down for that. Instead I wrote this simple korn shell script. Enjoy!

So, I’ve decided to start blogging again. This time around I’m going to try and keep things more related to technology. Less stuff about my personal life and thoughts. More stuff around application development and emerging technologies that I’m interested in and learning . I think over the past year or so that I’ve stopped blogging I’ve really gotten behind with architecture frameworks (new and maturing) and new programming concepts. Plus, I guess I might have had some useful information on my site because I’ve had some former readers trying to get a hold of me to get entries that I posted in my old blog. Because of this, I’ll also try to post some of my old entries that could be useful for someone.

I put together a script that will automate the installation and setup process of Subversion and Apache2 on Ubuntu. This script follows all the steps outlined in my Subversion tutorial which can be found here.

A few things to point out:

The subversion repository will be created at the root in a folder named “/svn”.

The script will download a new dav_svn.conf file from my server that has been modified for the script.

This script has only been tested on Ubuntu 6.10 Edgy Eft. If anyone runs the script successfully on another version of Ubuntu or another Linux distribution please let me know. Also, I am 99.999% 100% positive that the script will work on Ubuntu 6.06 Dapper Drake.

Update: I have been informed that the script is compatible with Ubuntu 6.06 Dapper Drake.

Note: I have created a script to automate this process. The post regarding the script can be found here.

This guide is for setting up a Subversion (SVN) repository in Ubuntu. Subversion is a version control system which enables multiple users to modify the same document. Therefore, a tool such as Subversion comes in really handy when developing software on a team. Also, Subversion can be a life saver when you need to revert back to older versions of a document (e.g. you made some changes to your code and now everything is broken).

This guide is for creating a repository that requires authentication for all access. This is unlike open source SVN repositories which allow anonymous read access. If you desire, access permissions can be changed at the end of step 3.

Also, this guide does not use SSL and therefore is only recommended for secure local networks (e.g. behind a router at your house or corporate network) if you are working on something important. Maybe I will add SSL to this tutorial in the future.

When creating this guide I used Ubuntu 6.06, Apache2 2.0.55, and Subversion 1.3.1. Ok, on with the walkthrough.

1) Install Apache2, Subversion, and the Apache modules for Subversion. You can install these packages via the Synaptic Package Manager or you can execute the following commands in the terminal.

2) Now we need to edit the libapache2-svn configuration file. To open the file, execute the following command.

sudo gedit /etc/apache2/mods-available/dav_svn.conf

3) Edit the file in the following locations:

To enable the repository:

Uncomment…

# DAV svn

To…

DAV svn

To set the path of the repository:

Note: This guide uses /svn for the Subversion repository. You can create the repository in any directory you wish, just make sure to change the path throughout the rest of the guide to represent your chosen directory.

5) Next we need to create the Subversion repository. As said before, in this guide we are going to create the repository in the directory /svn of the root directory. This command will create several SVN files and directories in /svn.

sudo mkdir /svn
sudo svnadmin create /svn

6) Then we have to change the ownership of the directory so that Apache can write to it.

sudo chown -R www-data:www-data /svn

7) Ok, let’s create an authenticated user that will have access to the repository. The following command will create a user named “bigbamboo”.

Note: You will be prompted for a password.

sudo htpasswd2 -c /etc/apache2/dav_svn.passwd bigbamboo

8) Now let’s create a project. Probably the easiest way to create a project is to import files that you would like to add to SVN. If you would like to learn more about the SVN import command please visit here.

Note:

“/home/bigbamboo/myproject” is the location of the files we want to add to the repository.

“projectname” is the name of the project we are adding to Subversion.

“-m” is used for adding a message to the commit.

“bigbamboo” is the username and “mypassword” is the password of the authenticated user.

From here you are on your own with adding, committing, updating, and reverting your documents. All of those commands can be done via the command line but there are several GUI applications that really help out. I highly recommend RapidSVN for Mac/Linux, and TortoiseSVN for Windows.

If you notice any errors in the guide please let me know. Also, I am always open to any suggestions as I am still learning too.