Setup a Subversion Server in 4 Minutes
You 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.
Very simple yet effective tutorial. Thanks for sharing.
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
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
I don’t think you actually install a Subversion Ever!.
Don’t try to tell you can do it in 4 minutes.
Bull!
Maybe 3, but never 4! Don’t think so!
simply superb…….
but i’ve a doubt…..
how to connect a client from server?
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!
This worked for me. I can normally access the repository from Eclipse. I skipped step 3. Saved a lot of time. Great post.
Thank you! Very useful
thanks man.. it really is helpful.. very simple yet very understandable.. keep it up..
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.
Than you! I just set up my svn server and using it with eclipse. Works great!!!
nice, definitly faster than others tuts i saw.
*I did need to ‘export SVN_EDITOR=vi’*, you can use the “-m” flag
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.
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
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.
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
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..
really a easy way to do. It helped me a lot thanks
Really nice tutorials to setting SVN server, I face problem of svn editor setting solved with export SVN_EDITOR=vi’* and
error:- svn: /var/svn/krepos/conf/svnserve.conf:12: Option expected
I had re-commented three parameters. and working fine.
simple, compact and great articel…
thanks
thanks found useful
This doesn’t work for me. I built out svn 1.5.4 from source. I do this and I get “svn: No repository found in ’svn://localhost/repositories/myproject”
I also get this error if I install from .deb packages or through apt-get. I’ve also looked through the subversion book, I don’t see what I’m missing.
I also get the “svn: No repository found in ’svn://…..’” too
I am doing on Mac OS 10.5 with svnadmin etc installed.
the svnserve is already running too.
Moreover, This is a very good tutorial! thanks
Hi,
I have created the svn repository. I want to access this svn repository from another pc using network.Could you please tell me how can I do this.
Thanks,
Harish
When i tried with the third step its giving me a error message
svn import /script/ file:///svnrepos/script
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the –message (-m) or –file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no ‘editor-cmd’ run-time configuration option was found
Please help me
Excelent! Saved me a lot of work. Thanks!
how do i import files from a single svn dump file? can anyone help? I hv a svn dump file of size 41 Mb approx.
For fizeen, you have misunderstood the comments above. If SVN_EDITOR, VISUAL or EDITOR are NOT set (which is your situation), you need to set one of these environment variables. For example,
export EDITOR=vi
Many distributions have EDITOR set already, so others did not need to set it.
Then, do the import.
Short, but not very practical. Running “svnserve -d” isn’t how you properly start a daemon. You need to configure it to run at boot time.