If you want to set up a Subversion repository and allow public browsing, use WebSVN. Trac, another similar option, has too many dependencies (including 'mod_python' or 'fcgi', which can be a pain) and WebDAV is out of the question for shared accounts, so an alternative is needed.
WebSVN offers a few different clean interfaces and a nice set of options. Here's how you set everything up:
Create a svn repository (we want to specify the FSFS type because the Berkley DB causes to many permission issues when apache runs as a different user than you):
$ cd ~/
$ mkdir svn
$ svnadmin create --fs-type fsfs svn
Lay out our repo into a nice format
You can create a separate repo for each project, which WebSVN supports, but in a small shared hosting account we want to keep the used disk space to a minimum. Therefore a single, carefully laid-out repo should serve just fine. The Subversion Book has some nice suggestions for this sort of thing.
Create a temporary directory and then import it, like so (be sure to replace <username> with your HostNine username):
$ mkdir tmpdir
$ cd tmpdir
$ mkdir ProjectA
$ mkdir ProjectA/trunk
$ mkdir ProjectA/branches
$ mkdir ProjectA/tags
$ mkdir ProjectB
$ mkdir ProjectB/trunk
$ mkdir ProjectB/branches
$ mkdir ProjectB/tags
$ svn import . file:///home/<username>/svn -m 'Inital repository layout'
Committed revision 1.
Now, let's make sure it worked. Delete the temp dir:
$ svnlook tree /home/<username>/svn
$ cd ../
$ rm -r tmpdir
Now we want to install WebSVN. You may not want to use truck; use a stable tag. You must use the username and password (both 'guest').
$ svn co http://websvn.tigris.org/svn/websvn/trunk www/websvn --username guest
Authentication realm: <http://wedsvn.tigris.org:80> CollabNet SCM Repository
Password for 'guest': guest
Checked out revision 445.
Finally, we point WebSVN at our repo and alter any other settings we want:
$ cd www/websvn
$ cp include/distconfig.inc include/config.inc
$ vim include/config.inc
Uncomment and edit this line:
$config->addRepository("My Projects", "file:///home/<username>/svn");
Note: If you are not using trunk, you may need to drop the "file://" above (which leaves you with "/home/<username>/svn"). The "file://" proctol appears to be a new feaure only in trunk.
That should do it. Don't forget to replace <username> with your HostNine username.
You can see a slightly modified (and currently empty) repo here. Both the config.inc file and install.txt file included with the package have very good documentation on the options available to you.