Installing and configure subversion (SVN) server

Werbung

Every developer should work with a version control system. In this post i will describe the subversion (svn) server installation.

The server system is the server version of Ubuntu 11.10. I don’t want to have unnecessary stuff. My svn server should run standalone.

In the tutorial i will use VirtualBox as virtual server. A tutorial about this you can find here (only in german at the moment).

After the installation of the basic virtual system the only thing i have to do is to install SVN with the command

After this i will create my first SVN repository. A repository is a place where the SVN will store the change information.

You can choose a directory you want. In this case i choose the /home directory. In the /home directory i will create a directory for the repositories. Each project should have it’s own.

With

we create a directory for the repositories.

The next step is to create a repository for your project with the name „project1“.

We dive into the repository directory with

To create a new repository directory we use svnadmin.

Now we have the directory „project1“ in place at /home/repositories and we’re ready for our first commit.

Before we do this, we create a new svn user. With this user we will later checkout the project and commit the changes.

Configure repository and create a user

The created repository we configure with

anon-access = none no anonymous access to the repository.
auth-access = write gives authenticated user write access.
password-db = passwd set the authentication type.

Now we edit the passwd file to create a new user.

We type in a username and a password like below

You can find two examples in the file but uncommented.

Werbung

So next we prepare the repository a little bit. With svn you have normaly three different directories: trunk, branches and tags. Have a closer look at wikipedia at branching and tagging.

To create the structure we go change the directory to /tmp, create a dummy directory und in this we create the trunk, branches and tags directory.

With the structure in place we put it into the repository with

The message editor will appear and we type in „main structure“ as message and quit the editor.

To communicate with the svn server we start the svn server daemon

Now we need the ip address of the svn server. We can get it by typing

when we’re on the svn server machine.

On the local machine we will checkout the project from the repository with

In our case i will use a fresh directory. If i’ve a existing project i will copy the files later in the directory and make a init commit.

Do check if everything is ok i will create a test file. After i’ve created the file i will check with

the status of my working copy. Die questionmark (?) will tell us that this file is not under version control. This we can fix by

For „FILE“ we set the name of the test file.

Again with

we will see that there is now an „A“ instead of the questionmark. This means that the file is added to the repository, but not committed. This we can do with

Again the text editor will appear and we can type in the commit message. There we should explain what we’ve changed in the project. It’s like a short documentation for the next developer or for us later in the year.

Thats all! Maybe we get an error message or a warning that the rights are missing. Then we have to change the right for the repository on the svn server.

Hat dir der Beitrag gefallen? Dann würde ich mich sehr freuen, wenn du ihn weiterempfehlen würdest.Share on Facebook
Facebook
Tweet about this on Twitter
Twitter

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Subversion Server / SVN Server installieren und einrichten

Werbung

Subversion Server / SVN Server

Werbung
Jeder Software Entwickler sollte mit einem Versionskontrollsystem arbeiten. In diesem Post möchte ich die Installation eines Subversion Server / SVN Server beschreiben.

Werbung

Als Server benutze ich ein Ubuntu System in der Serverversion 11.10. Ich lege Wert darauf, dass der SVN Server eigenständig läuft und keine weiteren Aufgaben übernimmt.

Weiterlesen

Hat dir der Beitrag gefallen? Dann würde ich mich sehr freuen, wenn du ihn weiterempfehlen würdest.Share on Facebook
Facebook
Tweet about this on Twitter
Twitter

6 Gedanken zu „Subversion Server / SVN Server installieren und einrichten

  1. Hey,

    leider bekomme ich keinen zugriff auf das repository! Bekomme folgende Meldung:
    svn: PROPFIND of ‚/home/repositories/projekt1‘: 405 Method Not Allowed (http://192.168.2.29)

    Hast du vielleicht ne Idee woran das liegen kann?

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.