Step by Step server and Source control setup

posted in XXChester's Blog
Published March 14, 2011
Advertisement
So on the weekend my servers HD failed and I had to go through the joys of resetting up a SVN server and what not. As I was going through this again I was thinking; "You know I really need to write a doc this time on how to do it so it is really easy if I ever have to set one up again". Everytime I have set a server up the same couple of things get me everytime and it takes awhile to figure them out.

Setting up a subversion server;

Notes:

[font=Calibri]-[/font] I have only done this on Windows XP 32 and 64 bit, but it should be similar for Vista/Windows7.

[font=Calibri]-[/font] If you are having trouble connecting to the server from either RDP or via your CVS Client, make sure the default Windows Firewall is turned off or the port is forwarded.

[font=Calibri]-[/font] To shut down your server via RDP open the Task Manager->Shut Down->Turn Off. This way you should never have to have a monitor hooked up to your server unless there is a major problem and you cannot connect to it.



1. Navigate to (http://subversion.ap...es.html#windows)

2. Download and Install Win32Svn

3. Right click My Computer->Properties->Advanced->Environment Variables->Add system variable

a. Name: SVN_EDITOR

b. VALUE: C:\Windows\Notepad.exe

4. Click Start->Run

5. Type "cmd" and hit enter

6. Type the following command to create the repository "svnadmin create d:\Repository" (You can change the d:\Repository" to wherever you want yours to be

7. Create a .bat file on your desktop called "Server Start". Edit this batch file and put the following command in it; "svnserve -d -r d:\Repository"

8. Now it is time to set up users. Navigate to your repository (d:\Repository\conf)

9. Edit svnserve.conf

10. Scroll to [General] and remove the pound and space from # anon-access read and # auth-access = write

11. Add the following line under the auth-access;

a. password-db = passwd

12. If the "passwd" file does not exist in the conf directory, create it.

13. Edit this file

14. Enter the following to this file;

a. [users]

b. Hit enter

c. Now enter in users you want to have write access to this repository. Here is an example "Brandon=monkey"

15. Open the "authz" folder in the configuration directory. Scroll to the bottom of the file and add the following data;

a. Type(with the brackets): [repository]

b. Hit enter

c. Type: $authenticated = rw

16. Click Start->Settings->Control Panel->Scheduled Tasks->Add New Task

17. Point the new task to run that "Server Start.bat" file we created earlier and under "Perform this task;" set it to "When I log on" this way when your server starts and you log in, it will automatically start the repository

18. Right click My Computer->Properties->Remote

19. Check the "Allow users to connect remotely to this computer"

a. You MUST have a password on your user account for this to work

b. Click "Select Remote Users" and select the user accounts you want to be able to RDP to the server

20. Restart your computer to make sure everything takes effect

Configuring your client computers to use the server;

To setup remote connecting to the server

1) Using your RDP(Remote Desktop Protocol) client of choice (RoyalTS or Windows built in Remote Desktop Client) open it up

2) Set the address/host to your servers name or IP address

3) Hit connect and enter your username/password of the servers account

4) If everything was setup properly you will connect to your server

5) Close down the RDP window as you now know you can connect to it remotely

6) Download and install Tortoise SVN or your CVS client of choice

7) Right click in a directory and click "Repository Browser"

8) Enter the below into the URL replacing my servers name (xxcheste-23eada) with either your servers IP address or computer name

a. svn://xxcheste-23eada



That should be it, you should be able to check out and commit work now. Enjoy the flexibility of versioning now.



This article was written by Brandon McCulligh based off the information compiled off the Internet and makes strong reference to the article below;

http://www.jaredrich...bversion_server

Use the above link for troubleshooting information



I hope this helps some people out.
Thank you for reading and best of luck in your future endeavours.
Previous Entry Great Couple of days
Next Entry XNA 4.0 Scripting
1 likes 2 comments

Comments

Endurion
Nice. There's a typo at step 7, that should be “svnserve –d –r d:\Repository"

Also, why aren't you simply installing the server as a Windows service? Makes it more comfortable (if it works) ;)
March 15, 2011 03:16 PM
XXChester
Thanks for the comment Endurion and I will correct the typo. As for a windows service, I use to install it as a service but it becomes a pain if you run multiple SVN repositories off of one machine; as I use to (1 for programming 1 for media files) on 2 different hard drives. I am sure there is a way to run both simultaneiously but I had a lot of troubles doing it. So I went to the batch file approach opposed to the service and this way I can just close the batch and open the other one if I run multiple repositories.

You are correct though, if you are only running 1 repository than you misewell install it as an automatic windows service. If anyone wants to run the server as a windows service opposed to a batch file scheduled task than the command is below;
sc create svn binpath= "c:\Subversion\bin\svnserve.exe --service -r D:\Repository" displayname= "Subversion Server" depend= Tcpip start= auto
March 15, 2011 07:12 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement