svn web管理之submin


1.安裝所需軟件包python

shell>yum -y install subversion subversion-devel httpd mod_dav_svn apr-devel apr-until-devel neon-devellinux

2.下載安裝pysvnshell

shell>wget http://pysvn.barrys-emacs.org/source_kits/pysvn-1.7.5.tar.gzapache

shell>tar zxf pysvn-1.7.5.tar.gz vim

shell>cd pysvn-1.7.2/Source/svn

shell> python setup.py backport  #python2.6版本如下要執行測試

shell> python setup.py configureui

shell> makeurl

shell> cd ../Tests/spa

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"

相關文章
相關標籤/搜索