This shows you the differences between two versions of the page.
subversion [2009/03/30 03:32] k2patel |
subversion [2020/08/10 02:35] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | <code bash> | ||
- | cd /usr/ports/devel/subversion | ||
- | </code> | ||
- | Make backup of Makefile. | ||
- | <code text> | ||
- | Edit Makefile and add following line. (after SVNFSTYPE?= fsfs OR before any APXS appeared on file) | ||
- | |||
- | APXS= /www/apache/bin/apxs | ||
- | |||
- | Now make with following options. | ||
- | |||
- | make -DWITH_MOD_DAV_SVN -DWITH_NEON -DWITH_BDB | ||
- | </code> | ||
- | |||
- | <code apache> | ||
- | #LoadModule dav_module | ||
- | # /usr/local/libexec/apache2/mod_dav.so (Disable this line if you already installed the mod_dav) | ||
- | LoadModule dav_svn_module modules/mod_dav_svn.so | ||
- | LoadModule authz_svn_module modules/mod_authz_svn.so | ||
- | </code> | ||
- | |||
- | Test it out the installation.\\ | ||
- | Now set according to following live example. | ||
- | |||
- | svn information | ||
- | |||
- | <code text> | ||
- | URL : http://xyz.k2patel.com/repos | ||
- | |||
- | |||
- | e.g. community project URL will be : http://xyz.k2patel.com/repos/projects/community | ||
- | |||
- | Username : paryt | ||
- | Password : asdua79 | ||
- | |||
- | repository access file location : /srv/www/svn/svn-access.conf | ||
- | |||
- | username defination file path : /srv/www/svn/.svnaccess | ||
- | |||
- | access INFO : svn co --username svnrepo http://xyz.k2patel.com/repos | ||
- | |||
- | </code> | ||
- | |||
- | <code text> | ||
- | svn-access.conf | ||
- | ^^^^^^^^^^^^^^^ | ||
- | [/] // for root information | ||
- | svnrepo = rw | ||
- | |||
- | [community:/branches/calc/bug-142] | ||
- | harry = rw | ||
- | sally = r | ||
- | </code> | ||
- | |||
- | |||
- | <code apache | Httpd.conf> | ||
- | |||
- | LoadModule dav_module /usr/local/libexec/apache/mod_dav.so | ||
- | LoadModule dav_svn_module /usr/www/apache/modules/mod_dav_svn.so | ||
- | LoadModule authz_svn_module /usr/www/apache/modules/mod_authz_svn.so | ||
- | |||
- | |||
- | |||
- | <VirtualHost 209.200.38.7:80> | ||
- | ServerName svn.newyorkdailypost.net | ||
- | DocumentRoot /www/virtual/swingerswgm/svnrepos | ||
- | CustomLog /www/stats/svn.newyorkdailypost.net-stats.log light | ||
- | CustomLog /www/logs/svn.newyorkdailypost.net-access.log sagi | ||
- | ServerAdmin webmaster@backend.newyorkdailypost.net | ||
- | /www/vapache/airon/conf | ||
- | <Location /repos> | ||
- | DAV svn | ||
- | SVNPath /www/virtual/swingerswgm/svnrepos/ | ||
- | AuthzSVNAccessFile /www/virtual/swingerswgm/svnrepos/svn_access.conf | ||
- | AuthType Basic | ||
- | AuthName "Subversion repository" | ||
- | AuthUserFile /www/virtual/swingerswgm/svnrepos/.svnaccess | ||
- | Require valid-user | ||
- | </Location> | ||
- | </VirtualHost> | ||
- | |||
- | </code> | ||
- | |||
- | Trac Install | ||
- | |||
- | Initialize trac using command | ||
- | |||
- | <code bash> | ||
- | trac-admin /www/virtual/swingerswgm/trac.newyorkdailypost.net initenv | ||
- | </code> | ||
- | |||
- | <code apache | httpd.conf> | ||
- | |||
- | LoadModule python_module /www/apache/modules/mod_python.so | ||
- | AddHandler mod_python .py | ||
- | |||
- | <VirtualHost xx.yy.zz.ee:80 > | ||
- | DocumentRoot /srv/www/svn/svnrepos/projects | ||
- | ServerName xyz.k2patel.com | ||
- | <Location /> | ||
- | SetHandler mod_python | ||
- | PythonInterpreter main_interpreter | ||
- | PythonDebug On | ||
- | PythonHandler trac.web.modpython_frontend | ||
- | PythonOption TracEnv /srv/www/svn/pqr.k2patel.com | ||
- | PythonOption TracUriRoot / | ||
- | </Location> | ||
- | <Location /login> | ||
- | AuthType Basic | ||
- | AuthName "MyCompany Trac Server" | ||
- | AuthUserFile /srv/www/svn/.svnaccess | ||
- | Require valid-user | ||
- | </Location> | ||
- | </VirtualHost> | ||
- | |||
- | </code> | ||
- | |||
- | <code text> | ||
- | Stand Alone Server (svn://) | ||
- | |||
- | /etc/rc.conf (FreeBSD specific) | ||
- | ------------ | ||
- | svnserve_enable="YES" | ||
- | svnserve_flags="-d -r /srv/www/svn/pqr.k2patel.com/svn --listen-host=0.0.0.0" | ||
- | svnserve_data="/srv/www/svn/pqr.k2patel.com/svn" | ||
- | svnserve_user="username" | ||
- | |||
- | |||
- | <Repo_dir>/conf/svnserve.conf | ||
- | ----------------------------- | ||
- | password-db = passwd | ||
- | |||
- | <Repo_dir>/conf/passwd | ||
- | ---------------------- | ||
- | edit password file and add username = password. | ||
- | </code> | ||
- | |||
- | <code text | SVN Access with SSH wrapper> | ||
- | URI - svn+ssh://{SSHUSERNAME}@{SERVER_NAME}/{REPO_DIR} | ||
- | |||
- | e.g. svn co svn+ssh://username@xyz.k2patel.com/srv/www/svn | ||
- | </code> | ||
- | |||
- | Wrapper script for svnserve | ||
- | <code text> | ||
- | First of all, rename the original svnserve command into svnserve.bin | ||
- | (it usually resides in /usr/bin/svnserve) | ||
- | |||
- | Paste the following text into your favorite Linux editor and change | ||
- | the /path/to/repository/root to something useful, eg.: | ||
- | /usr/share/subversion/repositories | ||
- | |||
- | Save the file as "svnserve", being the root superuser. | ||
- | </code> | ||
- | |||
- | <code bash | svnserve> | ||
- | #!/bin/sh | ||
- | # wrap in order to put root in by default | ||
- | # Script implemented by Adrian Robert <arobert@cogsci.ucsd.edu> | ||
- | |||
- | exec /usr/local/bin/svnserve.bin -r /path/to/repository/root "$@" | ||
- | </code> |