Follow this Blog!

Aug 21, 2012

f Comment

Install & Configure SVN on Ubuntu

MenuSVN+SSH Between Eclipse and Amazon EC2
Unblock SVN Port 3690 in Amazon EC2
Install & Configure SVN on Ubuntu
Import an Existing Directory into SVN
Checkout an SVN Project For Web Server
Checkout an SVN Project In Eclipse For Development
Use SSH as SVN Protocol Tunnel With TortoiseSVN
Amazon In this tutorial we'll be installing and configuring SVN program on Ubuntu 10.04.4. You'll get SVN, one of the best open source source control software applications, up and running in MINUTES!

As an option we'll be running the SVN server so that your SVN projects can be checked out remotely. Let's follow the following steps!

Step 1: Install Subversion
% sudo apt-get install subversion
Step 2: Create a Repository Directory
% sudo svnadmin create /svnrepos
Step 3: Configure svnserve.conf
% sudo vi /svnrepos/conf/svnserve.conf
Do the following in /svnrepos/conf/svnserve.conf:

remove the # before "anon-access" and change its value to "none"
remove the # before "auth-access"
remove the # before "password-db"

Here's my /svnrepos/conf/svnserve.conf:
### This file controls the configuration of the svnserve daemon, if you
### use it to allow access to this repository.  (If you only allow
### access through http: and/or file: URLs, then this file is
### irrelevant.)
### Visit http://subversion.tigris.org/ for more information.

[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
anon-access = none
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file.  If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
# authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
# realm = My First Repository

[sasl]
### This option specifies whether you want to use the Cyrus SASL
### library for authentication. Default is false.
### This section will be ignored if svnserve is not built with Cyrus
### SASL support; to check, run 'svnserve --version' and look for a line
### reading 'Cyrus SASL authentication is available.'
# use-sasl = true
### These options specify the desired strength of the security layer
### that you want SASL to provide. 0 means no encryption, 1 means
### integrity-checking only, values larger than 1 are correlated
### to the effective key length for encryption (e.g. 128 means 128-bit
### encryption). The values below are the defaults.
# min-encryption = 0
# max-encryption = 256
Step 4: Edit /svnrepos/conf/passwd
% sudo vi /svnrepos/conf/passwd
Add a line entry with the user name(s) and password(s) to be used for access. Only users defined in here are allowed to access your SVN server remotely. Suppose the user is ubuntu and password is ubuntupassword. Then the following is the line you should add right under [users]:

ubuntu = ubuntupassword
Here's my /svnrepos/conf/passwd:
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
ubuntu = ubuntupassword
Step 5: Change Owner of /svnrepos
% cd /svnrepos
% sudo chown -R ubuntu:ubuntu .

Why are we doing this? Up until now we've done everything with 'sudo' before because if you don't you might run into permission issues. Now that we set everything we can change owner back to ubuntu.

Step 6: Run SVN Server (Optional)
% svnserve -d
Without running the SVN server you can still work with SVN tool (e.g. check out code) locally, but you won't be able to check out code remotely.

If you have any questions let me know and I will do my best to help you!

◀ Unblock SVN Port 3690 in Amazon EC2Import an Existing Directory into SVN ▶
Please leave a comment here!
One Minute Information - by Michael Wen
Find Michael on Google or Facebook
ADVERTISING WITH US - Direct your advertising requests to Michael