1.安装所需软件包
shell>yum -y install subversion subversion-devel httpd mod_dav_svn apr-devel apr-until-devel neon-devel
2.下载安装pysvn
shell>wget http://pysvn.barrys-emacs.org/source_kits/pysvn-1.7.5.tar.gz
shell>tar zxf pysvn-1.7.5.tar.gz
shell>cd pysvn-1.7.2/Source/
shell> python setup.py backport #python2.6版本以下要执行
shell> python setup.py configure
shell> make
shell> cd ../Tests/
shell> make
shell>cd ../Source/
shell> mkdir /usr/lib/python2.4/site-packages/pysvn
shell> cp pysvn/* /usr/lib/python2.4/site-packages/pysvn/
简单测试pysvn
[root@submin ~]# python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysvn
3.安装配置submin
shell>wget http://supermind.nl/submin/current/submin-1.2.11.tar.gz
shell>tar zxf submin-1.2.11.tar.gz
shell> cd submin-1.2.11
shell> python bin/install.py /usr/local/
shell> /usr/local/bin/submin-admin create default
------------------------------------------------
Apache files created:
/etc/submin/default-apache-wsgi.conf
/etc/submin/default-apache-cgi.conf
Please include one of these in your apache config. Also make sure that
you have mod_dav_svn and mod_authz_svn enabled.
Created submin configuration with default user admin (password: admin)
-----提示创建/etc/submin创建了apache配置文件,submin默认用户和密码都是admin----
将生成的default-apache-cgi.conf文件连接到httpd配置文件目录下的conf.d,这样这个配置自动加载入httpd.conf中
shell> ln -s /etc/submin/default-apache-cgi.conf /etc/httpd/conf.d/submin.conf
4.创建svn根目录
shell> mkdir -p /data/trac
shell> cd /data/trac/
shell> cp /var/lib/submin/authz .
shell> cp /var/lib/submin/htpasswd .
shell> cp /var/lib/submin/userproperties.conf .
shell> rm -rf /var/lib/submin/svn/
shell> ln -s /data/trac /var/lib/submin/svn
5.修改权限
shell> chown -R apache:apache /data/trac
6.修改default.conf,svn认证文件及目录与创建的相同
[root@submin ~]# vim /etc/submin/default.conf
=====================================
[svn]
authz_file = /data/trac/authz
userprop_file = /data/trac/userproperties.conf
access_file = /data/trac/htpasswd
repositories = /data/trac
[www]
base_url = /submin
svn_base_url = /svn
trac_base_url = /trac #加入行
=======================================
7.修改submin.conf,svn认证文件及目录与创建的相同
shell> vim /etc/httpd/conf.d/submin.conf
========================================
<Location /svn>
DAV svn
SVNParentPath /data/trac
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /data/trac/htpasswd
AuthzSVNAccessFile /data/trac/authz
Satisfy Any
Require valid-user
</Location>
=============================================
shell> /etc/init.d/httpd start
8.测试
http://10.10.54.57/submin
9.在根目录下添加目录
shell>cd /data/trac
shell>svn checkout http://10.10.54.54/svn/test/
shell> cd test/
shell>svn mkdir wangxq
shell>svn ci -m "commit the file"