1.安装所需软件包

yum -y install subversion subversion-devel httpd mod_dav_svn apr-devel apr-until-devel neon-devel
 
2.下载安装pysvn
wget http://pysvn.barrys-emacs.org/source_kits/pysvn-1.7.5.tar.gz
 
[root@submin ~]# tar zxf pysvn-1.7.5.tar.gz 
[root@submin ~]# cd pysvn-1.7.2/Source/
[root@submin Source]# python setup.py backport #python2.6版本以下要执行
[root@submin Source]# python setup.py configure
[root@submin Source]# make
[root@submin Source]# cd ../Tests/
[root@submin Tests]# make
[root@submin Tests]# ../Source/
[root@submin Source]# mkdir /usr/lib/python2.4/site-packages/pysvn
[root@submin Source]# 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
 
如果提示错误,说明pysvn安装成功。
 
3.安装配置submin
 wget http://supermind.nl/submin/current/submin-1.2.11.tar.gz
 
[root@submin ~]# tar zxf submin-1.2.11.tar.gz 
[root@submin ~]# cd submin-1.2.11
[root@submin submin-1.2.11]# python bin/install.py /usr/local/ 
[root@web submin-1.2.11]# /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中
[root@submin ~]# ln -s /etc/submin/default-apache-cgi.conf /etc/httpd/conf.d/submin.conf
 
创建svn根目录
[root@submin ~]# mkdir -p /data/svn        
[root@submin ~]# cd /data/svn/
[root@submin svn]# cp /var/lib/submin/authz .
[root@submin svn]# cp /var/lib/submin/htpasswd .
[root@submin svn]# cp /var/lib/submin/userproperties.conf .
[root@submin svn]# rm -rf /var/lib/submin/svn/
[root@submin svn]# ln -s /data/svn /var/lib/submin/svn
 
修改权限
[root@submin ~]# chown -R apache:apache /data/svn
 
修改default.conf,svn认证文件及目录与创建的相同
[root@submin ~]# vim /etc/submin/default.conf 
    
    
    
    
  1. [svn] 
  2. authz_file = /data/svn/authz 
  3. userprop_file = /data/svn/userproperties.conf 
  4. access_file = /data/svn/htpasswd 
  5. repositories = /data/svn 
  6.  
  7. [www] 
  8. base_url = /submin 
  9. svn_base_url = /svn 
  10. trac_base_url = /trac       #加入行 
修改submin.conf,svn认证文件及目录与创建的相同
[root@submin ~]# vim /etc/httpd/conf.d/submin.conf 
    
    
    
    
  1. <Location /svn> 
  2.      DAV svn 
  3.      SVNParentPath /data/svn 
  4.  
  5.      AuthType Basic 
  6.      AuthName "Subversion repository" 
  7.  
  8.      AuthUserFile /data/svn/htpasswd 
  9.      AuthzSVNAccessFile /data/svn/authz 
  10.  
  11.      Satisfy Any 
  12.      Require valid-user 
  13.  Location> 
 
[root@submin ~]# /etc/init.d/httpd start
 
4.测试 svn web管理之submin安装_第1张图片
主要修改:
1. /etc/submin/default.conf和/etc/httpd/conf.d/submin.conf,让2个配置文件的目录和认证文件指向同一个文件(/data/svn).另外就是/etc/httpd/conf.d/subversion.conf中不需要对svn目录认证
2. submin的svn目录指向svn的目录