Creating svn ( sub version) on fedora

by Guna 2013-02-16 18:59:33

Follow these instructions to setup svn repositary in fedora:

You may already have subversion installed, if not, just run this:

# yum install subversion
# yum install mod_dav_svn

Create svn repo using svnadmin command:

# mkdir /svn
# chown -R apache:apache /svn
#svnadmin create --pre-1.6-compatible --fs-type fsfs /svn/myproject

Give full permission for the repo directory ( I don't know giving full permission on server is advisable, but right now i'm doing it on local system ),
#chmod -R 777 /svn/myproject/

Open httpd.conf, which is under /opt/lampp/etc/ and Add following lines ,

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /myproject>
DAV svn
SVNPath /svn/myproject
AuthType Basic
AuthName "Subversion MyPro Repository"
AuthUserFile /etc/svn-passwords/myproject
Require valid-user
</Location>

Save this file and close.

Create a htaccess password to protect our repo, if it prompts any password provide it.
# htpasswd -c /etc/svn-passwords/myproject

Make svn process to listen port 3690,
# svnserve -d --listen-port=3690

Now restart the apache,

# pkill -9 httpd
# /opt/lampp/lampp startapache

If you've any issues in starting apache, try this:
# /opt/lampp/bin/apachectl restart

Above command might show you something like, apache couldn't load xxx module.
So load these two modules from default apache which shipped with OS,

# cp /etc/httpd/modules/mod_dav_svn.so /opt/lampp/modules/
# cp /etc/httpd/modules/mod_authz_svn.so /opt/lampp/modules/

Just go to http://localhost/myproject in browser,give username and password we created with htpasswd command.

Now import some files to our newly created repositary,

#mkdir -p /tmp/svn-structure-template/{trunk,branches,tags}
#svn import -m 'Initial import' /tmp/svn-structure-template/ http://localhost/myproject/


Which outputs,

Adding /tmp/svn-structure-template/trunk
Adding /tmp/svn-structure-template/branches
Adding /tmp/svn-structure-template/tags

Committed revision 1.

THAT'S IT...
1153
like
0
dislike
0
mail
flag

You must LOGIN to add comments