Setup an SVN Repo server

I had to setup an SVN Repo server today, but I couldn’t. I’ve been working below pressure. And I believe that interrupted me from doing great work.

I believe, working below pressure is not always a good idea, it diminishes performance. I couldn’t setup an SVN repo today, but after I tried out later, it was very easy.

In order to document what I did, I’m writing this post.

Steps to setup

  1. Create your repo with:
    $ svnadmin create /path/to/your/repo
  2. Enable some conf to give access to other users to your repo
    1. Edit /pathYourRepo/conf/svnserve.conf
      anon-access = none      # anonymous acess
      auth-access = write     # authenticate acess

      We are giving none access to anonymous users and write to others. You can also use just read access.

      password-db = passwd

      Indicate the file path for the password file. In this case, it is a relative file in the same directory where the svnserve.conf is.

    2. Edit /pathYourRepo/conf/passwd file and add users and passwords.
      carlosuser = carlospassword
  3. Organize your repo project. You can create a separate file for each project and create the structure you want (trunk, branches, tags, and so forth).You can add directories to your repo:
    $ svn mkdir /full/path/to/your/repo/newDirectory

    Or you can import a project into your repo.

    $ svn import /path/to/project file:///full/path/to/repo

    You will need to provide a message to commit that changes.

  4. Start the svn server
    $ svnserve -d -r /path/to/your/repo

Test your repo

Now that you have configured your own repo, you might want to checkout your project. That is easy too:

$ svn checkout svn://localhost/pathRepo

First, you will be asked to provide the user realm (no idea what is that) but just left blank and press intro, then you will be asked the username and password you created. That’s all, you should have your project at you new path and any changes you make should be centralized into your server.

For more information about Subversion, this link will be useful.

Advertisements

About gcarlos

Some people call me engineer, other developer or programmer, but I rather like be called scientist because that is what I really want to do ...
This entry was posted in Subversion and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s