I have a laptop running Ubuntu that I would like to act as a Subversion server. Both for myself to commit to locally, and for others remotely. What are the steps required to get this working? Please include steps to:
- Get and configure Apache, and necessary modules (I know there are other ways to create a SVN server, but I would like it Apache-specific)
- Configure a secure way of accessing the server (SSH/HTTPS)
- Configure a set of authorised users (as in, they must authorised to commit, but are free to browse)
- Validate the setup with an initial commit (a "Hello world" of sorts)
These steps can involve any mixture of command line or GUI application instructions. If you can, please note where instructions are specific to a particular distribution or version, and where a users' choice of a particular tool can be used instead (say, nano instead of vi).
Afterwards, I needed to execute (within the context of the example quoted above)
$ sudo chmod g+w /var/svn/$REPOS/db/rep-cache.db
$ sudo chown www-data:www-data /var/svn/$REPOS/db/rep-cache.db
Otherwise I kept receiving a 409 error when committing local modifications (though the commitments were server side effective, I needed to follow up with local updates)
For Apache:
For SSH:
For Subversion:
If you'd like you can combine these into one command like:
I can't help with the rest...
Please write a single command on the terminal.
To open the terminal please press Ctrl + Alt + T, and then type this command:
Steps I've taken to make my laptop a Subversion server. Credit must go to AlephZarro for his directions here. I now have a working SVN server (which has currently only been tested locally).
Specific setup: Kubuntu 8.04 Hardy Heron
Requirements to follow this guide:
1: Install Apache HTTP server and required modules:
The following extra packages will be installed:
2: Enable SSL
Add or check that the following is in the file:
3: Generate an SSL certificate:
4: Create virtual host
Change (in ports.conf):
and (in svnserver)
Add, under ServerAdmin (also in file svnserver):
5: Enable the site:
To overcome warnings:
Add:
6: Adding repository(ies): The following setup assumes we want to host multiple repositories. Run this for creating the first repository:
6.a. For more repositories: do step 6 again (changing the value of REPOS), skipping the step
mkdir /var/svn
7: Add an authenticated user
8: Enable and configure WebDAV and SVN:
Add or uncomment:
9: Restart apache server:
10: Validation:
Fired up a browser:
Both required a username and password. I think uncommenting:
in
/etc/apache2/mods-available/dav_svn.conf
, would allow anonymous browsing.The browser shows "Revision 0: /"
Commit something:
Accept the certificate and enter password. Check out what you've just committed:
Following these steps (assuming I haven't made any error copy/pasting), I had a working SVN repository on my laptop.
If you get 403 forbidden when you hit the webserver it may be because you used a hostname that is not what you specified in your config file (ie localhost or 127.0.0.1). Try hitting https://whateveryousetasyourhostname instead...
This article seems to give a pretty good rundown of the entire process. I would recommend following the instructions, and then posting some more specific questions about any problems you encouter which aren't addressed in the articles I and other people have linked to in these responses.