This is an old revision of the document!
Howto install subversion by Jonas Levring
Start by installing Debian (howto)
With just the minimal Debian etch (didn't try sarge) installed, I got a few errors while compiling Subversion due to missing required libraries.
So below is a checklist to run so that ./configure while work from the first try (since it takes looooong to run, I thought it could be useful )
Make sure you have a decent C compiler installed (note: on “etch” I needed both GCC and G++, otherwise I got an error: “Error: C compiler cannot create executables” while running ./configure) It also needs zlibc (actually a few other related libs too)
Run these commands to be sure you have everything to configure subversion succesfully
apt-get install gcc apt-get install g++ apt-get install zlibc apt-get install zlib-bin apt-get install zlib1g apt-get install zlib1g-devel
Note: Do NOT use the apt version of subversion - the authorization part of it is broken
Also, under debian etch the package zlib1g-devel does not exist, try zlib1g-dev instead.
I will go through the most common parts of setting up a subversion server, but as backup there is a good manual
Create temp directory
cd /mnt/HD_a2/ mkdir tmp cd tmp
Get the source + dependencies (tested with 1.4.2)
wget http://subversion.tigris.org/downloads/subversion-1.4.2.tar.gz wget http://subversion.tigris.org/downloads/subversion-deps-1.4.2.tar.gz
Extract the tar's and access directory
tar xzvf subversion-1.4.2.tar.gz tar xzvf subversion-deps-1.4.2.tar.gz cd subversion-1.4.2
Build and install
./configure make make install
Note1: Remember to drink a cup of coffee (or 3) Note2: There are some parameters to set if you want to use subversion through Apache. But please remember that it requires Apache 2.0, and in my experience the DNS-323 is not powerful enough to run this. - Sorry - But if you want to try out, remember to check the install manual for parameters.
Now it should be working
Create repository
Create a couple of directories to ease the maintenance
mkdir /mnt/HD_a2/Data
mkdir /mnt/HD_a2/Data/svn
cd /mnt/HD_a2/Data/svn
If you are creating all the repositories inside this directory, its possible to start onlye one server, and still have the option to create special access rules to specific repositories.
In this case we start a repository only for my latest sourcecode (called: myLatestSourceCode)
mkdir myLatestSourceCode svnadmin create myLatestSourceCode/
Authorization
Sometimes it's useful to require username and password to access and/or update the repository.
By default its possible for anyone to read, but it requires username and password to update.
Edit svnserve.conf
pico svnserve.conf
Remove the #
where there is only one, so it look something like this:
Note: Don't comment-out # authz-db = authz
[general] anon-access = read auth-access = write password-db = passwd # authz-db = authz realm = My First Repository
Save the file and exit
It's possible to change the name of the repository by changing the realm
-text.
Edit the passwd
-file
pico passwd
Setup the usernames and passwords in clear-text. Example of creating a user named foo with the password bar.
[users] foo = bar
Save the file and exit
Start server
Now the server is ready to start.. Yeapii
svnserve -d --listen-port <port> --listen-host <ip or domain> -r /mnt/HD_a2/Data/svn/
I am running the server on port 8080, but it's up to you to choose. When setting up the ip or domain, remember not to use http in front. Example: svn.mydomain.com
It is recommended to enter the server-launch-string in the linuxrc file
Access repository
Now its possible to access the repository by the URL: svn://svn.mydomain.com:8080/myLatestSourceCode
.
Have fun