How To Create Your SVN Server

PreInstall

Server : Debian Squeeze

Repo Indonesia :

deb http://kambing.ui.ac.id/debian/ squeeze main contrib non-free
deb http://kambing.ui.ac.id/debian/ squeeze-updates main contrib non-free
deb http://kambing.ui.ac.id/debian-security/ squeeze/updates main contrib non-free
deb http://kambing.ui.ac.id/debian squeeze-proposed-updates main non-free contrib

Now update your server as usual # aptitude update

Install PHP5, APACHE2, SUBVERSION and TRAC

# apt-get install apache2 apache2-doc apache2-utils
# a2enmod rewrite
# a2enmod expires
# apt-get install libapache2-mod-php5 php5
# apt-get install php-pear php5-suhosin php5-xcache php5-mcrypt
# apt-get install php5-gd php5-memcache php5-mcrypt
# apt-get install mysql-server
# apt-get install php5-mysql

Now install subversion and trac

# apt-get install apache2 subversion trac
# apt-get install libapache2-svn
# apt-get install libapache2-mod-python
# mkdir /home/{trac,dev,svn}
# mkdir /home/dev/coba
# echo "<?php phpinfo() ?>" > /home/dev/coba/index.php
# svnadmin create /home/svn/inilah
# svn import -m "Initial import" /home/dev/coba/ file:///home/svn/coba/
# mv /home/dev/coba /home/dev/coba-orig
# svn checkout file:///home/svn/coba /coba/dev/inilah
# trac-admin /home/trac/coba initenv
  * Project Name [My Project]> coba
  * Repository type [svn]> svn
  * Path to repository [/path/to/repos]> /home/svn/coba
# htpasswd -c /etc/apache2/passwd-trac coba
# htpasswd -m /etc/apache2/passwd-trac userbaru
# cp /etc/apache2/sites-available/default /etc/apache2/sites-available/projects
full fill with this 
=============================================================
<VirtualHost *:80>
    ServerAdmin hostmaster@saprol.com

    DocumentRoot /var/www/

    <Directory /var/www/>
        Order allow,deny
        Allow from all
    </Directory>

    ## LOG
    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined

    ### TRAC Root : http://server/trac or http://server/trac/

        # Rewrite ./trac to ./trac/
        RewriteEngine on
        RewriteRule ^(.*)\/trac$ $1/ [NC]

    <Location /trac/>
        SetHandler mod_python
        PythonHandler trac.web.modpython_frontend
        PythonInterpreter main
        PythonOption TracEnvParentDir /home/trac
        PythonOption TracUriRoot /trac/
        SetEnv PYTHON_EGG_CACHE /tmp
    </Location>

    ### TRAC Login : http://server/trac/*/login
    <LocationMatch ^(/trac/[^/]+)?/login>
        AuthType Basic
        AuthName "TRAC Login"
        AuthUserFile /etc/apache2/passwd-trac
        Require valid-user
    </LocationMatch>

    ### SVN repository : http://server/svn
    <Location /svn>
        DAV svn
        SVNParentPath /home/svn
        SVNListParentPath on

        AuthType Basic
        AuthName "SVN Repository"
        AuthUserFile /etc/apache2/passwd-trac
        Require valid-user
    </Location>
</VirtualHost>
=====================================================================
# a2enmod rewrite
# a2dissite default
# a2ensite projects
# /etc/init.d/apache2 restart
# chown -R www-data. /home/trac

Now access you SVN server with # svn co http://ipadd/svn/coba

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s