搭建submin+apache+svn 图形化管理svn

7年前 (2017-09-19) gtj git, 自动化 0评论 已收录 1193℃

Submin提供一个基于Web的界面来管理Subversion仓库。
它的功能包括:用户/组管理 路径权限管理 创建SVN库 它使用htpasswd/svn authz来进行身份验证,所以可以使用与apache2/svn相同的登录信息。

1.安装svn及相关依赖包

 yum -y install subversion subversion-devel httpd mod_dav_svn apr-devel apr-until-devel neon-devel apr-util-sqlite

2.下载submin并安装

[root@ldap-server01 ~]# wget https://supermind.nl/submin/current/submin-2.2.2-1.tar.gz
 tar zxf  submin-2.2.2-1.tar.gz 
 cd submin-2.2.2-1
 python setup.py install

3.创建submit环境

mkdir -p /var/www/svn                  创建svn目录
svnadmin create /var/www/svn               创建svn环境
submin2-admin /var/lib/submin initenv your@email.address   创建submin环境
[root@ldap-server01 submin-2.2.2-1]# submin2-admin /var/lib/submin initenv 258818040@qq.com

Submin can enable features for you automatically. Please answer which features
you want to enable. You can choose to enable: 'svn', 'git', 'trac', 'apache'
and 'nginx'.

Which features do you want to enable? [svn, git, apache, nginx]> svn,apache  #选择使
用哪种功能

Please provide a location for the Subversion repositories. For new Subversion
repositories, the default setting is ok. If the path is not absolute, it will
be relative to the submin environment. If you want to use an existing
repository, please provide the full pathname to the Subversion parent
directory (ie. /var/lib/svn).

Path to the repository? [svn]> /var/www/svn   #SVN路径

Please provide a hostname that can be used to reach the web interface. This
hostname will be used in communication to the user (a link in email, links
in the web interface). The hostname should be a FQDN, so instead of 'foo' it
should be 'foo.example.com'. Please correct if the default is incorrect.

Hostname? [ldap-server01]> 10.0.0.7 #主机名,写IP地址。这个就是你用浏览器访问的地址

The HTTP path tells Submin where the website is located relative to the root.
This is needed for proper working of the website. Submin will be accesible
from <http base>/submin, Subversion will be accessible from <http base>/svn.
If you use Trac, it will be accessible from <http base>/trac.

HTTP base? [/]>   #直接回车

Submin will send emails for password resets and for commit message (if
enabled). You can set the sender email address that Submin will use. The
default might work in some places, but not all.

Email from envelope? [Submin <root@ldap-server01>]> 258818040@qq.com
 #发件箱地址 邮箱很重要, submin会将管理员设置初始口令的链接发到这邮箱中

注意项:
/var/lib/submin 这个目录不要提前建,安装命令的向导一步步设置就可以了,说明很清楚.
svn仓库apache一定要有访问权限,否则submin后期将会报错,无法创建仓库
如果服务器不能发邮件 也可以配置sendmail发邮件,sendmail配置如下:

yum -y install sendmail sendmail-cf
mv sendmail.cf sendmail.cf.bak
m4 sendmail.mc > sendmail.cf
/etc/init.d/sendmail start
优先使用stmp发邮件。 异常时使用本地的sendmail,配置smtp
submin2-admin  /var/lib/submin  config set smtp_hostname  smtp.exmail.qq.com
submin2-admin  /var/lib/submin config set smtp_port 25
submin2-admin  /var/lib/submin  config set smtp_username 258818040@qq.com
submin2-admin  /var/lib/submin  config set smtp_password  *****
submin2-admin  /var/lib/submin config set smtp_from "svn <258818040@qq.com>"
submin2-admin  /var/lib/submin config set commit_email_from "svn<258818040@qq.com>"

4.链接配置文件

submin2-admin /var/lib/submin apacheconf create all
submin2-admin /opt/submin config set vcs_plugins svn
ln -s /var/lib/submin/conf/apache-webui-cgi.conf /etc/httpd/conf.d/
ln -s /var/lib/submin/conf/apache-svn.conf /etc/httpd/conf.d/
/etc/httpd/conf/httpd.conf 
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule dbd_module modules/mod_dbd.so
LoadModule authz_svn_module modules/mod_authz_svn.so
/etc/init.d/httpd start

5.重置密码

 cd /var/lib/submin/conf/
 sqlite3 submin.db
 select * from password_reset;



进入web:



6.管理svn

创建一个仓库


创建一个用户组


创建一个用户


然后在svn对应的仓库里添加我们创建的用户,和对应的组,然后就可以在浏览器中访问对应的svn仓库啦。

7.汉化submin

cd /usr/lib/python2.6/site-packages/submin/static
链接:http://pan.baidu.com/s/1qYuQ5Us 密码:ocmm
mv templates templatesbak
unzip templates.zip
重新打开浏览器就能看到汉化后的效果。

博主

这货来去如风,什么鬼都没留下!!!

相关推荐

嗨、骚年、快来消灭0回复。

×
订阅图标按钮
Less is more!!!