.:My Black Corner:.

Wednesday, August 13, 2008

Dokumentasi (pribadi) Subversion

Ini bukan tutorial, tapi dokumentasi pribadi saya dalam membuat server SVN. Hanya untuk mempermudah penggunaan perintah SVN.

File buat_projek_SVN
########
#!/bin/sh
echo "Masukan nama project SVN: "; read pro
svnadmin create /var/repositori/$pro
chmod -R 777 /var/repositori/$pro
trac-admin /var/www/trac/$pro initenv && chown -R www-data.svn /var/www/trac/$pro
echo "Pembuatan project svn selesai..."
echo "Jangan lupa tambahkan conf di /etc/apache2/sites-enabled/000-default"
echo "OK..."
########


File userSVN
########
echo "Masukan nama user baru: "; read user
echo "Masukan password yang diinginkan :"; read pass
/usr/bin/htpasswd -cb /etc/apache2/passwords.temp $user $pass
cat /etc/apache2/passwords.temp >> /etc/apache2/passwords
echo "Berhasil menambahkan user " $user
########


File 000-default
########
Location /repo/Transcript
DAV svn
SVNPath /var/repositori/Transcript
SVNAutoversioning On
AuthzSVNAccessFile /home/svn/svn-access.conf
Authtype Basic
AuthName "Subversion Repository for Transcript"
AuthUserFile /etc/apache2/passwords
Require valid-user
/Location

Location ~ "/trac/\w+/login"
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/passwords
Require valid-user
/Location

Location /trac
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/www/trac
PythonOption TracUriRoot /trac
Authtype Basic
AuthName "Trac of Subversion Repository Sapua Bandung"
AuthUserFile /etc/apache2/passwords.sapua
Require valid-user
/Location

Untuk otentikasi SVN
File /home/svn/svn-access.conf
########
[groups]
commit = user1, user2, user3
readonly = user4

[Transcript:/]
@commit = rw
@readonly = r
########

posted by .:CyberColombuzz:. at 10:37 AM

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home