Setup a Subversion Server in 4 Minutes
Code, Linux March 2nd, 2007You are going to need to type fast but I think you can do it in 4 minutes.
These are my notes on what worked for me on my Fedora core 6 with svn lib already installed by the package manager:
1. Create a Repository
svnadmin create /svnrepos
2. Create a SVN User
vi /svnrepos/conf/svnserve.conf
In that file add these three lines:
anon-access = none auth-access = write password-db = passwd
Create a password file:
vi /svnrepos/conf/passwd
In that file add a line for your user:
# add users in the format : user = password tony = mypassword
3. Import Your Project
(assuming you’ve put your project files in /projects/myrailsproject)
svn import /projects/myrailsproject file:///svnrepos/myrailsproject
4. Start the SVN Server as Daemon
svnserve -d
Done! You should now have a svn server running with one project named myrailsproject.
Try checking it out of the repository:
svn co svn://192.168.0.2/svnrepos/myyrailsproject
Since we set anon-access to none you should be prompted for username and password which you created in the file /svnrepos/conf/passwd.








March 3rd, 2007 at 12:04 am
Very simple yet effective tutorial. Thanks for sharing.
March 3rd, 2007 at 9:11 am
That’s It??? Well, I think I can do it faster than 4 minutes, let’s try… …
jejeje… see? It was faster, installation included (with Ubuntu)
Total Time: 2:30 now, I don’t know if this works
March 12th, 2007 at 6:17 am
problem with import?
“svn: error while loading shared libraries: /usr/local/lib/libsvn_ra_dav-1.so.0: cannot restore segment prot after reloc: Permission denied”
any ideea ? PLS PLS HELP me achebv@gmail.com
April 11th, 2007 at 12:14 pm
I don’t think you actually install a Subversion Ever!.
Don’t try to tell you can do it in 4 minutes.
Bull!
May 8th, 2007 at 5:18 pm
Maybe 3, but never 4! Don’t think so!
August 28th, 2007 at 2:01 am
simply superb…….
but i’ve a doubt…..
how to connect a client from server?
October 11th, 2007 at 2:07 pm
This worked smoothly for me except for the fact that I did not have $SVN_EDITOR set to anything so I could not import my projects. Once I set this (export SVN_EDITOR=vi), everything worked beautifully. An alternative to setting SVN_EDITOR is to use the -m “message to record describing this action” option.
Note also that I had to , open port 3690 to access my SVN server from other machines.
Thanks for putting this together!
November 30th, 2007 at 5:48 am
This worked for me. I can normally access the repository from Eclipse. I skipped step 3. Saved a lot of time. Great post.
December 11th, 2007 at 2:17 pm
Thank you! Very useful
February 11th, 2008 at 11:16 pm
thanks man.. it really is helpful.. very simple yet very understandable.. keep it up..
February 19th, 2008 at 8:30 pm
Excellent! Thanks for that simple tutorial. I did need to ‘export SVN_EDITOR=vi’ as mentioned by another poster, which allows you to edit the svn check-in comment.
Thanks! It worked great, out of the box in Leopard, which comes with an svn install.
March 20th, 2008 at 12:59 am
Than you! I just set up my svn server and using it with eclipse. Works great!!!
April 23rd, 2008 at 6:19 pm
nice, definitly faster than others tuts i saw.
*I did need to ‘export SVN_EDITOR=vi’*, you can use the “-m” flag
April 30th, 2008 at 7:15 pm
Excellent tutorial! =)
thank you so very much. the other ones are longer, and I cant follow those on a short time-frame. I know the installing part is missing. but for example, in CentOS 5 that I have, just import rpm key, then do a “yum install subversion” is all you need to install the (binary) package. Yes, you will need to hit Y when prompted and yes you do need root or equil access to install as usual.
Thank you for Jon W for the additions. and others for saying skip step 3. works for me.
May 15th, 2008 at 4:50 am
a very nice tutorial, but it didn’t work for me. to get to my machine I first have to $ ssh -L 22369:IPADDRESS:3690 -lblah -N -f, and then
$ svn –username blahblah co svn://localhost:22369/myrailsproject .. and received no response. sshd xinetd are running on IPADDESS. From inside IPADDRESS, $ svn co svn:/localhost/myrailsproject works fine. Any suggestions why the computer isn’t listening to the request? Thanks
May 23rd, 2008 at 9:21 pm
Florin,
Make sure you did “sudo svnserve -d”. Subversion needs to run as root. If it runs as your local user, it probably won’t have permission to most things, and you’ll get “permission denied” errors.
June 25th, 2008 at 10:38 pm
[…] wants to cite sources, so here you go: Version Control with Subversion reference gregsidberry.com tonyspencer.com MediaTemple.net (dv) Developer’s Tools and Packages Listing An Introduction to the Root User […]
July 22nd, 2008 at 12:29 pm
Thanks, great post, I succeded with ubuntu 8.04.
I noticed you have an extra “y” in the last code line
svn co svn://192.168.0.2/svnrepos/myyrailsproject
July 28th, 2008 at 1:25 am
hi can you help me with setting up SVN server over my subdomain? i search for articles regarding those but the links they gave me are not updated..
August 29th, 2008 at 5:38 pm
really a easy way to do. It helped me a lot thanks