Monday, August 2, 2010

Installing Subversion server on Ubuntu...

I need a source control in my local network. No need for fancy http or https. Custom svn protocol should be sufficient.

1) Install Subversion
    $ sudo apt-get install subversion
2) Create directory for my repository
    $ mkdir /home/dirn/svn
    $ cd /home/dirn/svn
    $ mkdir my-repo
3) Create repository by using svnadmin command
    $ sudo svnadmin create /home/dirn/svn/my-repo
4) Create a new group called subversion
    $ sudo groupadd subversion
5) Add your username and www-data into the group
    $ sudo usermod -a -G subversion www-data
    $ sudo usermod -a -G subversion user_name
6) Set permission
    $ cd /home/dirn/svn
    $ sudo chown -R www-data:subversion my-repo
    $ sudo chmod -R g+rws my-repo
7) Edit svnserve.conf file
    $ nano /home/dirn/svn/my-repo/conf/svnserve.conf
8) Uncomment the following line and save the file
    # [general]
# password-db = passwd
9) Edit passwd file
    $ nano /home/dirn/svn/my-repo/conf/passwd
10) Add your svn username and password and save the file
    username = password
11) Run svnserve service
    $ svnserve -d --foreground -r /home/dirn/svn
12) To access the project repository, run the following command
    $ svn co svn://hostname/my-repo my-repo --username user_name
Note:
Tested on Ubuntu 10.04 64-bit and Linux Mint 10 64-bit.

1 comment:

  1. Not very related, but for my non-office-hours source code, I use Unfuddle. It's free, it's good, and it's on a server.

    ReplyDelete