推荐参考网站:http://www.oschina.net/p/submin
Submin 提供了基于 Web浏览器的 Subversion 版本控制系统的管理接口,功能包括用户、用户组的管理、路径权限的设置以及创建新的资料库等等。兼容各种浏览器。
下面开始我们的管理之旅
准备环境:apache的安装,svn的安装,要确保apache已安装有支持svn的两个模块,帖一份svn的web配置,自己理解
# vim /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
#注意,下面的路径,子文件夹名不能和父文件名重复,不然就会出问题
Options MultiViews
Satisfy Any
SVNParentPath /var/svn
SVNListParentPath on
AuthType Basic
AuthName "svn in 200"
#AuthzSVNAccessFile /var/svn/conf.d/authz
#AuthUserFile /var/svn/conf.d/webpasswd
AuthUserFile /var/lib/submin/htpasswd
AuthzSVNAccessFile /var/lib/submin/authz
Require valid-user
# </LimitExcept>
</Location>
svn是已经安装完整的,submin是web管理接口嘛,所以要有web访问环境(二者自行安装,此处不再做解)
# wget http://supermind.nl/submin/current/submin-1.2.10.tar.gz
# wget http://supermind.nl/submin/current/submin-1.2.10.tar.gz
#
tar zxvf submin-1.2.10.tar.gz
# cd submin-1.2.10
# ls
bin debian INSTALL lib LICENSE man templates tests www
安装方法就在这里面
# vim INSTALL
Submin Installation
-------------------
When installing from tarball, please run:
python bin/install.py <installdir>
(Use the '--help' option to get more options)
To install submin in /usr/local, fill in /usr/local for <installdir>. You can
then run /usr/local/bin/submin-admin to create your submin project (multiple
seperate projects are possible). This program will show some help, but for a
quick start, just run:
/usr/local/bin/submin-admin create default
and it will create files in /etc/submin, /var/lib/submin. Please note that
you have to include one of the generated apache files in /etc/submin/ to your
apache2 config. You can use the "Include" directive for that if you want
to include it in only a specific virtual host.
Then restart apache, go to http://[your webserver]/submin, and log in as user
admin with password admin.
If any instructions are not clear, please file a bug (see 'development' on the
website).
# python ./install.py /usr/local
# /usr/local/bin/submin-admin create default
# cp /etc/submin/default-apache-cgi.conf /etc/httpd/conf.d/apache-cgi.conf
# vim /etc/httpd/conf.d/apache-cgi.conf
Alias /submin /usr/local/share/submin/www
<Directory /usr/local/share/submin/www>
Order allow,deny
Allow from all
Options ExecCGI FollowSymLinks
AddHandler cgi-script py cgi pl
SetEnv SUBMIN_CONF /etc/submin/default.conf
RewriteEngine on
RewriteBase /submin
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ submin.cgi/$1
RewriteRule ^/?$ submin.cgi/
</Directory>
<Location /var/svn>
DAV svn
SVNParentPath /var/svn/
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /var/lib/submin/htpasswd
AuthzSVNAccessFile /var/lib/submin/authz
Satisfy Any
Require valid-user
</Location>
# httpd -S
VirtualHost configuration:
Syntax OK
# /etc/init.d/httpd restart
OK 访问测试一下
http://172.16.1.200/submin 默认登录名和密码都是admin(进入后自行修改)
以上仅仅完成安装而已,要想让svn转起来,还要配置一番
首先看一下登录后的界面
怎么能让这些
Repositories正常显示呢?
# vim /etc/submin/default.conf
[svn]
authz_file = /var/lib/submin/authz #####此为安装submin默认权限文件
userprop_file = /var/lib/submin/userproperties.conf
access_file = /var/lib/submin/htpasswd
#####此为安装submin默认密码文件 (权限文件和密码文件都需要和svn web访问定义的文件保持一致)
#repositories = /var/lib/submin/svn
#####此为你本地svn库所在目录
repositories = /var/svn #####以上均可按照自己的实际情况自行修改
[www]
base_url = /submin #####这是submin的web访问方式 即:http://localhost/submin
svn_base_url = /svn
#####这是svn的web访问方式
trac_base_url = /svn
[backend]
bindir = /usr/local/share/submin/bin
[generated]
session_salt = PCRV0oYQi9U56qAl
注意以上两处圈,左侧为你本地的svn库,右侧的则为你本地库的web访问地址,点击:
以上搭建完毕;
增加个人账户,组账户,版本库,及分配权限,可自行测试,上几张图满足一下
分别是个人,组,库
看一下权限分配
设置权限分配点击画圈处
分配权限
无论是整个库,还是库下的子目录均可细化的分配权限,注意图中圈出内容,可对个人,可对组分配权限,权限包括,只读和读写。
以上。。。。。。
转载于:https://blog.51cto.com/huoyingdk/1165043