Pengen Punya WebSite instan kualitas intan ?

Sunday, May 16, 2010

Configure Subversion Apache Repository

In this tutorial i will not discuss about How to configure apache to load a subversion module on it. If you search about apache with subversion how-to / installation. Please feel free to click this url below http://www.idprayoga.com/2010/05/configure-apache2-and-working-with.html

I also assume you already have apache with subversion module loaded. from the tutorial above. Next thing is to configure apache repo so we can working with svn with browser.


Make Repository
#mkdir /usr/local/subversion/repos
#/usr/local/subversion/bin/svnadmin create --fs-type fsfs /usr/local/subversion/repos
#ls /usr/local/subversion/repos/
conf  db  format  hooks  locks  README.txt

Create and Add SVN users
#/usr/local/apache2/bin/htpasswd -cmd /usr/local/subversion/repos/conf/svn-auth-file admin

New password: [adminpass]
Re-type new password: [adminpass]
Adding password for user admin

Testink
+ Importing svn
#/usr/local/subversion/bin/svn import /usr/local/apache2/htdocs file:///usr/local/subversion/repos/trunk/dev -m 'test importing htdocs'

+ Checking svn
#/usr/local/subversion/bin/svn checkout file:///usr/local/subversion/repos/trunk/dev #/svnwork

Configure SVN on Apache
+ Configure SVN work directory
#chown -R daemon.daemon /usr/local/subversion/repos/

+Configure Apache
#vi /usr/local/apache2/conf/httpd.conf
# Add line like this:
<Location /repos>
DAV     svn
SVNPath /usr/local/subversion/repos/
AuthType Basic
AuthName "SVN Repos"
AuthUserFile /usr/local/subversion/repos/conf/svn-auth-file
Require valid-user
</Location>

+Restart Apache
#/usr/local/apache2/bin/apachectl stop
#/usr/local/apache2/bin/apachectl start

You can check this out on 'http://youripserver/repos'

And you can add 2 directory again :
#/usr/local/subversion/bin/svn mkdir http://localhost/repos/branches
#/usr/local/subversion/bin/svn  mkdir http://localhost/repos/tags

Those command above is supposes to create a directory in repos

Why we need 3 directory Trunk, Branches and Tags ?

Trunk : This directory is to save a code from a current modified / to store an brand new updated.

Branches : This directory is suppose to be a branch for modify a cms or modify 1 or 2 cms so may be we will have more sub dir in this directory then.

Tags : This directory is to save a code from different days. we also can setup a cronjob every night to get a new source code from a trunk directory and each date. this is about to make work more easily to coordinate or roll back to a spesific date.

source: http://www.wowtutorial.org/tutorial/271.html and http://www.blackonsole.org/2009/10/svn-with-apache-on-suse-linux.html

1 comments:

minority scholarships said...

Great information! I’ve been looking for something like this for a while now. Thanks!

Post a Comment