0% found this document useful (0 votes)
98 views4 pages

Mac Subversion Server Guide - SVN Server Downloads and Tutorials

Mac Subversion Server Guide | SVN Server Downloads and Tutorials

Uploaded by

Carol Castro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views4 pages

Mac Subversion Server Guide - SVN Server Downloads and Tutorials

Mac Subversion Server Guide | SVN Server Downloads and Tutorials

Uploaded by

Carol Castro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Mac Subversion Server Guide | SVN Server Downloads and ...

http://svn-ref.assembla.com/subversion-server-guide-mac-os.html

Home

Server Guide

Client Guide

Resources

Download Clients

Share

Free Apache Subversion Server Installation Guide


Download Links and Tutorials for Subversion Servers

Subversion Hosting at Assembla


Assembla provides the world's best subversion hosting in the the cloud. Our
secure, reliable, and feature-rich subversion hosting is FREE and scalable with
integrated task and issue management, social collaboration, and project
management tools.

Get a Free SVN Repository


Learn more about Subversion Hosting at Assembla.

Install Subversion Server On Mac OS X from Binaries


Starting with OS X Leopard (10.4.5), Subversion is included in the core operating system. However, the version included is a bit dated as of this
writing. The version that ships with Leopard is 1.4.4 while the current stable version is 1.6.6. If you want the most recent stable version, then
follow all the steps in this guide. If you're cool with the 1.4.4 version, then you can skip down to Step 2.

1. Download & Install Subversion Server


Download Subversion Server for Mac OS X from:
CollabNet Installer for Mac OS X (SVN v1.6.6 - Recommended) - Collabnet's Binary will install Subversion Server along with the modules necessary to
integrate your Subversion Server with Apache webserver to provide an HTTP/WebDAV interface to your repositories. To install, just visit this link, download the
dmg and follow the install instructions.
Install Subversion Server from MacPorts (SVN v1.6.5) - Installing Subversion Server from Mac Ports will get you Subversion 1.6.5 with just a few simple
commands in your terminal. But if you've never heard of MacPorts, chances are you'll need to download and install it first. It's easy, just download the MacPorts
.dmg, double-click it and follow the instructions. Once you've installed MacPorts, open a Terminal window (located in the Applications/Utilities Folder) and then
follow the instructions in this handy tutorial, then return here and continue with Step 2.
Install Subversion From Source (Not for the feint of heart) - You'll want to follow this tutorial if you wish to compile and install Subversion Server from
source. You'll most likely only want to do this if you need to integrate with Apache, or are an Xcode Developer. There is a complete tutorial available here. Once
you've completed the tutorial on the Apple Developer site, come back here and check out our Mac OS SVN Client Reviews to find the SVN Client that's right for
you.

If you're using Mac OS X 10.4.5 or better and you used the Collabnet Installer above, you'll need to first tell your system which Subversion
installation to use, since it already has version 1.4.4 installed. To do this, you'll need to prepend the PATH environment variable with the new
subversion install location. To do this, open a Terminal Window (located in the Applications/Utilities Folder) and type everything you see after the
dollar sign, then hit return:

$ pico ~/.bash_profile

Then add the following line to this file:

export PATH=/opt/subversion/bin/:$PATH

Then hit Control + X, then confirm saving the file with 'y', then hitting return. Now we've added the new Subversion installation to your System's
path and need to tell the Terminal that we've updated this variable. To do that type the following and hit return: (note: there is a space between
the first and second periods)

$ . .bash_profile

Now, when we type the following we should see that we are running Subversion v1.6.6

1 of 4

2/5/15, 10:10 AM

Mac Subversion Server Guide | SVN Server Downloads and ...

http://svn-ref.assembla.com/subversion-server-guide-mac-os.html

$ svn --version

Share

2. Create and Configure your first Subversion Repository


Now that you've finished installing Subversion, let's get that first repository up and running! (Note: we'll be using the command-line for this
section, so go ahead and open up Terminal.app. You can find it in the Applications/Utilities folder. You can follow along by just typing everything
you see after the $ sign and then hit return.
First let's create a location to store all of our repositories:

$ mkdir -p /Library/Subversion/Repository

You can put them anywhere you like, we just chose this as a suitable default location.
Now we'll use the Subversion administration tool, svnadmin, to create our first repository. For this Tutorial, we'll call our first project aptly titled
"myfirstproject:"

$ cd /Library/Subversion/Repository
$ svnadmin create myfirstproject

Great! Now that we've created our first repository, we need to configure the permissions for who can access the repository. To do that we'll need
to edit the configuration file "svnserve.conf" located in your project's "conf" directory. Open "/Library/Subversion/Repository/myfirstproject
/conf/svnserve.conf" in your favorite text editor.
When you open this file, you'll see a heavily ### commented file. The lines with the single "#" comment marks are the ones we need to edit. You'll
want to remove the comments (#) and customize these settings to suit your project's needs. Here are what the main directives in this file mean:
password-db - this is the name of a text file that stores the usernames and passwords of authorized users for your repository. Unless otherwise specified, it will
be assumed that this file is stored in your projects "conf" directory. When you create your repository a "passwd" file is created by default. You may want to
change this to something a little more cryptic. If you would like to set up a single password file that would work with multiple repositories, you may wish to store
this password file elsewhere, and use an absolue path such as /Library/Subversion/Users/passwd-db
realm - realm tells clients what they are connecting to. It's recommended you customize this to something like "<Project Name> Subversion Repository." But
you can of course choose any name you wish.
anon-access - this directive indicates what anonymous users are allowed to do with your repository. The three valid values are none, read, and write. As you
would expect, none allows anonymous users to neither read nor write to your repository; read grants read-only access, and write (not recommended) allows for
both read and write permissions.
auth-access - determines what permission level authorized users will have. In almost every case this will be set to write. Again, the three valid options are
none, read, and write.

At the bottom of this conf file, you may also see the option to use SASL to handle security and authorization for your Server. We're going to leave
that commented out, but if you want to explore a more secure alternative, you can find out more about configuring Subversion Server to work with
SASL in the SVN Book, which is available from the Collabnet folder from your Start Menu or on the SVN Book website here: Using svnserve with
SASL.
Once you've saved your customized svnserve.conf, you'll need to open or create your password-db file. In this example we've just used the
included passwd file located in the conf directory. Open that file, and you'll see something like the following:
[users]
# harry = harryssecret
# sally = sallyssecret

Using the same format, you can add as many users to your repository(s) as you want in this file. Add at least one user for yourself so that you
can begin committing to your repository, and save the file.
Next we'll need to change the permissions on the Repository directory so that svnserve is permitted to make changes to the files stored there:

$ sudo chown -R root:admin /Library/Subversion/Repository


$ sudo chmod -R ug+rwX,o= /Library/Subversion/Repository

After you've done that, it's time to fire up the svnserve Subversion Server daemon:

$ svnserve -d -r /Library/Subversion/Repository

2 of 4

2/5/15, 10:10 AM

Mac Subversion Server Guide | SVN Server Downloads and ...

http://svn-ref.assembla.com/subversion-server-guide-mac-os.html

3. Testing Your Subversion Server Configuration


Now we're ready to make sure that we can check out a working copy and work with it. We're going to use the command-line svn client to handle
the Subversion client-side tasks. If you don't already have a Graphical Subversion Client installed, be sure to check out our Mac OS Subversion
Clients Guide.

Share

Let's create a directory called projects in our home directory to hold the working copies of our SVN Projects, and then issue the commands to
check out a working copy of the project we created in the previous step:

$ cd ~
$ mkdir projects
$ cd projects
$ svn checkout svn://localhost/myfirstproject

If you set read permissions to authorized users only, you'll be prompted to enter your username and password. After you've successfully checked
out a working copy, we'll add a default project layout and a test file before we make our first commit.

$ cd myfirstproject
$ svn mkdir branches tags trunk
$ touch trunk/test.txt
$ svn add trunk/test.txt

Now we're ready to commit our first revision to our repository:

$ svn commit -m "Initial Import"

Because we're inside of the my project directory we don't need specify the url to the repository. If you have specified in your svnserve.conf file
that only authorized users can make commits, then you'll be prompted again for your username and password.
If your commit was successful, you should see some output like this:

Adding branches
Adding tags
Adding trunk
Adding trunk/test.txt
Committed revision 1.

Now you've successfully installed, configured, and worked with your first project hosted on your own Subversion Server.

4. Additional Resources
Make svnserve launch on startup
It wouldn't be very practical to have to remember to manually start svnserve each time your server needs a reboot. To fix this issue, read this
tutorial to learn how to create a daemon that launches automatically whenever the server boots using launchd.
Manually Integrate Subversion with Apache
If you chose not to install Apache along with Subversion, we realize that doesn't mean you don't want to use it. If you need to integrate your new
Subversion server with a pre-existing 2.2.x Apache Server, this guide is for you.
Free Mac OS Subversion Client Guide
Need a Graphical Subversion Client for your Mac development machine? We've reviewed some of the most popular mac client's in our
Subversion Client Guide.
The Subversion Book
"Version control with Subversion" published by O'Reilly, is the go-to manual for all things subversion, and you can view it online or as a pdf. (If
you used any of the installers above, you'll find the manual available from your start menu as a pdf or chm). If you have more advanced

3 of 4

2/5/15, 10:10 AM

Mac Subversion Server Guide | SVN Server Downloads and ...

http://svn-ref.assembla.com/subversion-server-guide-mac-os.html

configuration needs, or just want to get more familiar with Subversion... RTFM! :-)
Official Subversion Website
Join the subversion project, checkout the latest nightly build from source, file a bug report, or just learn more about the project here.
Share

Company

Products

Resources

Support

About Assembla

Workspaces

Developer API

Customer Support Portal

Facebook

Twitter

Testimonials

Enterprise

Third Party Integrations

Feature Requests

LinkedIn

Google+

Blog

[email protected]

Blog RSS

Meet The Team

Connect

Contact Us

Copyright 2006 - 2014, Assembla Inc. | Terms of Service | Privacy Policy

4 of 4

2/5/15, 10:10 AM

You might also like