How to install subversion 1.6.6 on FreeBSD 7.2

How to install Subversion 1.6.6 on FreeBSD 7.2.
The basic overivew.

  1. Install FreeBSD.
    How do I install FreeBSD?

  2. Update FreeBSD and download the ports tree.
    What are the first commands I run after installing FreeBSD

  3. Then install Subversion.

I have previous documents about installing each of the steps above installing Subversion. This document will only cover Subversion.

Installing Subversion on FreeBSD from ports

  1. Go to /usr/ports/devel/subversion and run make install.

    cd /usr/ports/devel/subversion
    make install

    NOTE: If you get a failure due to apr already being installed but not being built correctly, then uninstall apr and reinstall it with the default settings. Then go back and try to install subversion again.

    cd /usr/ports/devel/apr
    make deinstall
    make BATCH=yes install

  2. Configure Subversion to start at bootup.

    echo # Subversion >> /etc/rc.conf
    echo 'svnserve_enable="YES"' >> /etc/rc.conf

  3. Create an svn user using the adduser command line wizard. This command will walk you through creating an svn user. Make sure to use the nologin shell and a random password so the user cannot login.

    # # adduser
    Username: svn
    Full name: svn
    Uid (Leave empty for default):
    Login group [svn]:
    Login group is svn. Invite svn into other groups? []:
    Login class [default]:
    Shell (sh csh tcsh nologin) [sh]: nologin
    Home directory [/home/svn]:
    Home directory permissions (Leave empty for default):
    Use password-based authentication? [yes]:
    Use an empty password? (yes/no) [no]:
    Use a random password? (yes/no) [no]: yes
    Lock out the account after creation? [no]:
    Username : svn
    Password :
    Full Name : svn
    Uid : 1002
    Class :
    Groups : svn
    Home : /home/svn
    Home Mode :
    Shell : /usr/sbin/nologin
    Locked : no
    OK? (yes/no): yes
    adduser: INFO: Successfully added (svn) to the user database.
    adduser: INFO: Password for (svn) is: /2CZct48a
    Add another user? (yes/no): no

  4. Make a repos directory in the svn user's home directory.

    # mkdir /home/svn/repos

  5. Create a repository.

    cd /home/svn
    mkdir repos
    cd repos
    svnadmin create MyApp

    This will create a MyApp folder and populate it with the files needed to start a repository.

    This is default subversion repository folder structure:

  6. To configure a Repository and add users, edit the following file:

    # ee /home/svn/repos/MyApp/conf/svnserve.conf

    Uncomment lines below or just create a new svnserve.conf file with these lines:

    anon-access = read
    auth-access = write
    password-db = /home/svn/userdb

    Now edit the following file:

    # ee /home/svn/repos/MyApp/passwd

    Add users. For example, to add a user allen1 with a password of P@sswd! and another user jared with a password of My$ecre+1, the file would look like this:

    allen1 = P@sswd!
    jared = My$ecre+1
  7. Now start the svn server.

    # /usr/local/etc/rc.d/svnserve start

  8. Now you should be able to connect to your repository with an svn client. TortoiseSVN is a popular windows tool that you can use to connect to your repository.

    Use the following to connect:


Now i have to figure out a bunch more steps...
How to populate an SVN repository?
How to configure Subversion to use Cyrus-SASL2 to authenticate to a MySQL database?
How to configure Subversion to use Cyrus-SASL2 to authenticate to a MySQL database where the password is stored in a hash? So you can have SVN share Bugzilla users?
How to get Tortoise SVN to connect to an SVN repository?
How to install WebSVN as a web interface to the SVN repository?

Copyright ® - Linking to this article is allowed without permission and as many as ten lines of this article can be used along with this link. Any other use of this article is allowed only by permission of


  1. 離婚 says:

    do you have twitter or facebook;I want to be your fans in hurry.

Leave a Reply

How to post code in comments?