心's profile真心的家PhotosBlogLists Tools Help

Blog


    May 10

    SVN和BugFree的整合(一)……用户整合

    本来想使用trac当做SVN的Issue Trace,但trac还是单项目模式,而且还是使用起来比较不习惯,所以暂时考虑SVN和BugFree的整合,目前两者只是用户名的整合,将来考虑是否整合进trac的形式,在BugFree的项目中直接看到Subversion库里的信息

    使用的版本:
    Windows SP1.5(sp1,后来打的几个补丁)
    Subversion 1.2.0
    BugFree 0.4
    Apache 2.0.54
    mod_auth_mysql.so 2.0.49(apache连接MySQL认证)
    TortoiseSVN 1.2

    SVN的用户管理其实有两个内容,一个是认证:检验用户名,密码是否正确,登录进SVN服务器;第二是权限:针对代码仓库Repository的读写权限分配。

    一,首先按照SVN和Apache整合的文档,使用SVNParentPath方式,这样可以在这个目录下建立多个Repository。
    我的所有操作全部是在本机进行的,有时会使用TortoiseSVN进行客户端的操作,其实完全可以使用SVN的命令行方式。

    1,安装Subversion,apache,TortoiseSVN,建立D:\svntest\parent目录,这里将是SVN所有Repository的根目录,然后在parent目录下,创建a1目录,选中a1,右键菜单,选择TortoiseSVN中的“Create Repository here..”,创建一个基于FSFS的仓库。
    2,修改httpd.conf,添加:
    <Location /parentsvn>
     DAV svn
     SVNParentPath D:/svntest/parent
    </Location>

    3,在浏览器中浏览:http://127.0.0.1/parentsvn/a1/,可以看到正确的信息Revision 0。说明apache,SVN已经整合好了。

    二,利用BugFree的用户认证

    1,首先安装BugFree,保证BugFree能正常运行。其使用的数据库名是bugfree,存放u/p的字段是表buguser里的UserName,UserPassword字段。密码可以用多种方式加密,注意检查include\ConfigBug.inc.php里的$BugConfig["UserTable"]["EncryptType"]是否是md5。

    2,解压mod_auth_mysql.so到apache/modules目录里。注意,mod_auth_mysql不是apache自带的,而是sf的一个项目,主页在http://modauthmysql.sourceforge.net/。目前版本已经到了3.0.0,下载下源码的话,自己需要编译,还需要apache的源码,比较麻烦。 不过已经有人编译好了相应的模块,在http://www.gknw.net/development/apache/httpd-2.0/win32/modules/下载。里面还有2.9.4版本的,但在我的安装中,始终不能正常。所以我只有使用了2.0.49,只是稍微有些设置不一样。

    3,修改httpd.conf里的设置。

    <Location /parentsvn>
     DAV svn
     SVNParentPath D:/svntest/parent
     
     AuthName "MySQL Testing"
     AuthType Basic
     Require valid-user

     AuthMySQLHost localhost
     AuthMySQLUser root
     AuthMySQLPassword xxxxxx

     AuthMySQLDB bugfree
     AuthMySQLUserTable buguser
     AuthMySQLNameField UserName
     AuthMySQLPasswordField UserPassword

     AuthMySQLMD5Passwords On
    </Location>
    </IfModule>

    重启apache,你再次访问http://127.0.0.1/parentsvn/a1/,就弹出认证窗口了,输入用户名admin密码123456,就可以浏览了。

    至此,SVN的用户已经和BugFree的用户整合在一起了。可以在BugFree系统中创建用户,修改密码了。

    下一步需要做的是设置SVN中多用户,多Repository的访问权限控制。

    全文完·非狐外传@2005年8月2日

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://zhenxin0603.spaces.live.com/blog/cns!A7EBA72EFE1604C5!139.trak
    Weblogs that reference this entry
    • None