You are on page 1of 3

:SVN 1.3.2.

2 Installation:

yum install subversion


or
yum update subversion

yum install mod_dav_svn


/etc/rc.d/init.d/httpd restart

svnadmin create /svn/projects

A. USERS creation and their Authentication:

1.Create a user's file using htpasswd (comes with Apache)

Use the following command to enter a password for each user (-c to create the
file)

To generate first time:

htpasswd -cm /svn/svn_access username

Adding another users:

htpasswd -n username

It will generate a username:password Copy that whole contents in


/svn/svn_access

2. Creating an Authorized SVN Access file


#e.g.
[/]
vaibhav = rw

[/mes_audit_tool]
amol = rw

B. Apache Configuration:

1. # Add the following lines to http.conf to instruct Apache to load the


mod_dav_svn module. These lines must be added before any Subversion-related
configuration items:

LoadModule dav_svn_module modules/mod_dav_svn.so

2.Add the following lines to httpd.conf somewhere AFTER the LoadModule commands to
tell Apache where you keep your Subversion repositories:

<Location /svn>
DAV svn
SVNParentPath /svn/projects
AuthzSVNAccessFile /svn/svn_access
Require valid-user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /svn/svn_auth
</Location>

3. add the appropriate virtual host entries.

<VirtualHost 192.168.0.161:80>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /svn
ServerName 192.168.0.161
ErrorLog /svn/logs/dummy-host.example.com-error_log
CustomLog /svn/logs/dummy-host.example.com-access_log common
</VirtualHost>

/etc/rc.d/init.d/httpd restart

C. Initial Import:

1)Import from file system

e.g.
svn import /home/amol.ghosalkar/amol/stpi file:///svn/test_repos -m "Initial
import"

OR

2) Import from web

svn import /home/sharjeel.s/Project/MES_Fedora_RH_Linux_auditing_tool


http://192.168.0.161/svn/mes_audit_tool -m "Initial import"

Note:Please ensure Apache has requisite permissions to directories.

D. Working with SVN:

1. For Linux

To checkout the files into a working directory called "moltool":

svn checkout http://192.168.0.161/svn/mes_audit_tool moltool

2. For VS.NET

download plugin from http://ankhsvn.tigris.org/


and install it on your visual studio instance

Backup script for svn:

#!/bin/sh -e
###########################################################
# Back up Subversion repositories
###########################################################

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Subversion config
###########################################################

# My config
#SVN_DIR="/var/svn"
#BACKUP_DIR="."

SVN_DIR="/svn"
BACKUP_DIR="/tmp/svnbkup"
SVN_REPOS=`ls $SVN_DIR`

# Dump repositories
###########################################################

for repos in $SVN_REPOS; do


svnadmin dump --incremental --deltas --quiet $SVN_DIR/$repos \
> $BACKUP_DIR/$repos
done

exit 0

SVN Client on Windows:

In Tortoise SVN

For 1st time importing to the server:

Click option ->Import

Enter Valid URl e.g. http://192.168.0.161/svn/testsvn


Where testsvn is the name of the repository.

Import should be done by using Only authenticated person who has rights to create
a repository for e.g. Vaibhav In our SVN.

Exporting directory from Server to Client:

Click option ->Export


Enter Valid url for your repository
e.g.Url repository ->http://192.168.0.161/svn/testsvn
Export directory-> Where you want to store.

SVN Checkout:

After changes in Exported folder for changes reflect on the server we have to do
SVN checkout
right click the mouse on exported folder click SVN Checkout.
Then ener URL repository and the Checkout Directory.
Changes will automatically reflected on the server.

You might also like