Leadwerks Game Engine
Недостаточно оценок
Setting up SVN server on Ubuntu 12.04
От Kavex
This is a guide on setting a SVN server on a cloud VPS using Ubuntu 12.04
   
Наградить
В избранное
В избранном
Удалить
What is SVN?
Apache Subversion (often abbreviated SVN, after the command name svn) is a software versioning and revision control system distributed as free software under the Apache License. Developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation.
Setting up hosting!
If you don't already have a computer or server that is already running linux then you can rent one off the internet. For this tutorial I'm going to show you how to setup a VPS with Ubuntu 12.04 running Subversion.

This guide is expecting you are developing on windows (If not then you'll need to find a SSH and SVN client for your OS)

You can use any host you want but for this to make things easy i'll be using DigitalOcean[www.digitalocean.com]

1. Go to DigitalOcean[www.digitalocean.com] and click sign up
2. Update your billing information by entering your credit card information or prepay with paypal.
3. Now click on the Green Create Button
4. Enter a name into Hostname
5. Select the size of the server you want ($5 is a good start but I always suggest the $10 one)
6. Pick Region
7. Select the Ubuntu 12.04.3 x64
8. Now select the Create Droplet at the bottom

You will be emailed with all the information

1. You will need to download a SSH Client like Putty[the.earth.li]
2. In putty you will enter the IP you got in your email under Host Name and click Open
3. I black window will popup asking for login so you need to type root
4. Now it is going to ask you for a password and that will be the one that is in the email.
5. Once it say root@hostname:~# then type passwd and enter in a new password (this will be the new password to login)

Now you are ready to install Subversion
Installing Subversion
1. In the SSH client you are going to type sudo apt-get install -y subversion apache2 libapache2-svn nano
2. Once done installing type sudo mkdir -p /var/lib/svn/
3. Now type cd /var/lib/svn/
4. Now we are going to make a new repo by typing sudo svnadmin create <your-repository>
<your-repository> can be any name you want (I used test for my name)

5. Type sudo chown -R www-data:www-data <your-repository>
6. Type sudo nano /etc/apache2/mods-enabled/dav_svn.conf

7. Uncomment these lines (Remove the # in front of the name)
<Location /svn> DAV svn SVNParentPath /var/lib/svn AuthType Basic AuthName “Subversion Repository” AuthUserFile /etc/apache2/dav_svn.passwd <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location>

Hit ctrl-x then Y then Enter to save the file

8. Type sudo htpasswd -cm /etc/apache2/dav_svn.passwd <username>
Replace <username> with your username
Enter in the password you want

Make a login for each team members

9. Type sudo /etc/init.d/apache2 restart

If you would like to know more about Subversion[subversion.apache.org]

Note: You might need to open these ports if your have a firewall installed: 80, 8080, 443, 3690, 22
Using TortoiseSVN
1. Download and install TortoiseSVN[tortoisesvn.net]

2. If you click on any folder and go to TortoiseSVN
- Import will commit files
- Repo-browser also you to check the svn changes
3. If you right click on any folder and pick SVNCheckout... this will download files from the SVN

4. Enter in http://ip-address/svn/<your-repository> in the URL of repository
5. Enter in one of the usernames you made with it's password and you should have access to the SVN server

This should get you started
Why should I make my own svn server?
Of course there are free hosting but most of those limit the space or are public viewing only. By making your own svn server, you get more space and control over your projects then you can over any hosting plan.

But if you wish to look into other options then take a look at this link
http://www.svnhostingcomparison.com/

VPS around $5-10 will get you 20-60GB of space normally and if you are using a dedicated server hosting then this is usually a lot more.

In the end it's up to you what you want
Комментариев: 6
BlownToBits 17 мар. 2019 г. в 4:28 
Super. Coop is the best and now i can add it to my game
Kavex  [создатель] 1 окт. 2014 г. в 19:38 
Really? I had just learned SVN the day before writing this
jlea 1 окт. 2014 г. в 19:10 
Also remove the -C switch from .htpasswd if you want to add multiple users.
jlea 1 окт. 2014 г. в 19:04 
Nice one man! All the other guides didn't work.
Kavex  [создатель] 12 авг. 2014 г. в 22:09 
Wow someone looked at this guide. I'm a bit shocked. Your welcome
oddflavour 12 авг. 2014 г. в 20:49 
Thanks for this guide. I won't be using it for the moment but it is good to see it anyway.