Install Subversion-1.4.6

Untuk meng-install Subversion pastikan apache2 sudah terinstall di mesin anda, silahkan download jika belum ada dan install:
root@dotproject:/# cd /home/david/src
root@dotproject:/# wget http://apache.the.net.id/httpd/httpd-2.2.9.tar.gz
root@dotproject:/# tar xzvf httpd-2.2.9.tar.gz
root@dotproject:/# cd httpd-2.0.61
root@dotproject:/# ./buildconf
root@dotproject:/# ./configure
–enable-mods-shared=”most ssl dav”
–enable-maintainer-mode
–enable-cgi
–enable-dav
–enable-dav-lock
–enable-dav-fs
–enable-deflate
–enable-auth-digest
–enable-rewrite
–enable-action
–enable-so
–enable-ssl
–enable-module=shared
root@dotproject:/# make
root@dotproject:/# make install

Generate SSL certificate untuk Webserver:

$>cd /usr/local/apache2/conf
$>mkdir ssl.crt ssl.key
$>openssl req -new -x509 -days 3650 -keyout ./ssl.key/
server.key -out ./ssl.crt/server.crt -subj ‘/CN=
dotproject.domain Certificate’

root@dotproject:/# cp ssl.key/server.key ssl.key/server.key.org
root@dotproject:/# openssl rsa -in ssl.key/server.key.org -out ssl.key/
server.key

root@dotproject:/# chmod 400 ssl.key/server.key
root@dotproject:/# chmod 400 ssl.key/server.key.org

Download Subversion 1.4.6

root@dotproject:/# cd /home/david/src
root@dotproject:/# wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz

Compile dan Install Subversion:
root@dotproject:/# tar xzvf subversion-1.4.6.tar.gz
root@dotproject:/# cd subversion-1.4.6
root@dotproject:/# rm -rf /usr/local/lib/libsvn*
root@dotproject:/# rm -rf /usr/local/lib/libapr*
root@dotproject:/# rm -rf /usr/local/lib/libexpat*
root@dotproject:/# rm -rf /usr/local/lib/libneon*

root@dotproject:/# ./configure
–enable-maintainer-mode
–with-ssl
–with-neon=/usr
–with-apr=/usr/local/apache2
–with-apr-util=/usr/local/apache2
–with-apxs=/usr/local/apache2/bin/apxs
–with-zlib
–with-swig=/usr/bin/swig
–enable-swig-bindings=all
PYTHON2=/usr/bin/python
PERL=/usr/bin/perl
–without-jdk
–without-jikes
–without-junit
root@dotproject:/# make
root@dotproject:/# make install
root@dotproject:/# make swig-py
root@dotproject:/# make install-swig-py
root@dotproject:/# make swig-pl
root@dotproject:/# make install-swig-pl
root@dotproject:/# echo /usr/local/lib/svn-python > /usr/lib/python/site-packages/svn-python.pth

Membuat user dan group untuk Subversion:

root@dotproject:/# groupadd svn-grp
root@dotproject:/# useradd svn_user -G svn-grp -s /bin/bash
root@dotproject:/# passwd svn_user svn_password

Membuat Subversion Repository:

root@dotproject:/# mkdir /data
root@dotproject:/# mkdir /data/repos
root@dotproject:/# chown -R svn_user.svn-grp /data/*

root@dotproject:/# svnadmin create /data/repos/MyProjects –fs-type fsfs
root@dotproject:/# svn mkdir file:///data/repos/MyProjects/trunk -m “trunk”

Membuat user authentic untuk repository:

root@dotproject:/# cd /data/repos
root@dotproject:/# touch svn-auth-file
root@dotproject:/# chown svn_user.svn-grp svn-auth-file
root@dotproject:/# chmod 440 svn-auth-file
root@dotproject:/# htpasswd -cb /data/repos/svn-auth-file user password

Tambahkan semua user yang akan mengakses ke repository ini dengan:
root@dotproject:/# htpasswd -b /data/repos/svn-auth-file user password

Ubah path/lokasi SVNPath dan AuthUserFile di httpd.conf:
——————
<Location /websvn>
DAV svn
SVNPath       /data/repos/MyProjects
AuthType Basic
AuthName “Subversion repository”
AuthUserFile /data/repos/svn-auth-file
Require valid-user
</Location>
——————
Simpan konfigurasi dan restart apache2

root@dotproject:/# /usr/local/apache2/bin/apachectl stop
root@dotproject:/# /usr/local/apache2/bin/apachectl start

Berikut screenshot subversion di browser, masukan username dan password yang dibuat via htpasswd:

Referensi:
http://svn.collab.net/repos/svn/trunk/INSTALL
http://www.komaii.com/linux/apache2-ssl-subversion-trac-on-SuSE10.0/index.html
http://svnbook.red-bean.com/en/1.1/ch01s07.html

semoga bermanfaat…

Advertisements

About davidand

Hi, welcome to my blogs. My name is David Andriansyah. I am currently working as an independent Cognos Business Intelligence consultant, and I also as Freelance Web Developer. View all posts by davidand

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: