1/安装svn,创建版本库
yum install sunversion
mkdir /data/svn -p
2、下载安装submin
mkdir /usr/local/submin -p
wget http://supermind.nl/submin/current/submin-1.2.10.tar.gz
tar zxf submin-1.2.10.tar.gz
cd submin-1.2.10/bin
python ./install.py /usr/local/submin/
submin-admin create default
yum install apr apr-util
yum install mod_dav_svn
这里会自动生成一些文件,这里authz是管理用户的权限;htpasswd是管理用户的密码;
userproperties是管理用户的其他信息(邮箱等);default.conf是主配置文件,
之后需要修改;最后一个文件是和apache的整合,需要添加到apache的主配置文件里面。
3、安装apache
yum install httpd -y
#添加以下行
vim /etc/httpd/conf/httpd.conf
Include /etc/submin/default-apache-cgi.conf
4、配置submin的相关文件
ln -s /etc/submin/default-apache-cgi.conf /etc/httpd/conf.d/submin.conf
这个文件之后需手动修改,做链接目的方便管理
cp /var/lib/submin/authz /data
cp /var/lib/submin/htpasswd /data
cp /var/lib/submin/userproperties.conf /data
把submin的用户信息文件复制到我们自己之前建立的svn库的根目录中
rm -rf /var/lib/submin/svn/
ln -s /data/svn /var/lib/submin/svn
chown -R apache:apache /data
因为要用apache登录,所以这里把svn库根目录的用户进行修改
vim /etc/submin/default.conf
[svn]
authz_file = /data/authz
userprop_file = /data/userproperties.conf
access_file = /data/htpasswd
repositories = /data
[www]
base_url = /submin
svn_base_url = /svn
trac_base_url = /trac
[backend]
bindir = /usr/local/submin/share/submin/bin
[generated]
session_salt = cNz.DDwkWUD5hxxI
修改submin.conf
vim /etc/httpd/conf.d/submin.conf
Alias /submin /usr/local/submin/share/submin/www
<Directory /usr/local/submin/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 /svn>
DAV svn
SVNParentPath /data
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /data/htpasswd
AuthzSVNAccessFile /data/authz
Satisfy Any
Require valid-user
</Location>
/etc/init.d/httpd restart
http://192.168.121.128/submin 默认用户密码admin admin
登录后再web页面修改密码;
本文出自 “LINUX Super梦” 博客,请务必保留此出处http://215687833.blog.51cto.com/6724358/1872800
原文地址:http://215687833.blog.51cto.com/6724358/1872800