在OpenSUSE上搭建基于Web的SVN服务器

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

SVNWebserveroverOpenSUSE在OpenSUSE系统上搭建SVNWeb服务器版本信息OS:OpenSUSE-11.1kernel2.6.27.21-0.1-paeSVNServer:subversion-1.6.15WebServer:httpd-2.2.17Perl:perl-v5.10.0builtfori586-linux-thread-multi搭建过程准备WebServer参见在openSUSE系统上搭建Apache2服务器准备SVNServer安装。参见在openSUSE系统上搭建SVN服务器为SVN创建系统用户组/用户ian@pub-laptop-ian:~sudo/usr/sbin/groupadd-rsvnian@pub-laptop-ian:~sudo/usr/sbin/useradd-r-gsvn-d/srv/svn-s/bin/falsesvn创建存放SVN库的目录ian@pub-laptop-ian:~sudomkdir/home/SVN创建存放SVN库testian@pub-laptop-ian:~sudomkdir/home/SVN/testian@pub-laptop-ian:~sudosvnadmincreate/home/SVN/testian@pub-laptop-ian:~sudochown集成SVN至Web服务Apache配置在/usr/local/apache2/conf/http.conf文件结尾,追加如下内容#Configurationforasubversionrepository#see/usr/share/doc/packages/subversionforthefulldocumentation#IfModulemod_dav_svn.cLocation/repos/testDAVsvnSVNPath/home/SVN/test#Limitwritepermissiontolistofvalidusers.LimitExceptGETPROPFINDOPTIONSREPORT#RequireSSLconnectionforpasswordprotection.#SSLRequireSSLAuthTypeBasicAuthNameWriteaccessrequiresapasswordAuthUserFile/srv/svn/user_access/test_passwdfileRequirevalid-user/LimitExcept/Location/IfModule注意:更改配置之后,需要重启Apache。设置SVN访问权限ian@pub-laptop-ian:~sudomkdir/srv/svnian@pub-laptop-ian:~sudomkdir/srv/svn/user_accessian@pub-laptop-ian:~sudotouch/srv/svn/user_access/test_passwdfileian@pub-laptop-ian:~sudochownroot:@pub-laptop-ian:~sudochmod640/srv/svn/user_access/test_passwdfileian@pub-laptop-ian:~sudo/usr/local/apache2/bin/htpasswd/srv/svn/user_access/test_passwdfileian基本测试在如下环境的下,进行了浏览(无需授权)和提交(需要授权):svnoveropenSUSE-11.1TortoiseSVNoverWin32在如下环境的下,进行了浏览(无需授权):IEoverWin32Chrome-8.0.552.224overopenSUSE-11.1Firefox/3.0.8GTB7.1overopenSUSE-11.1高级访问控制参考关闭匿名浏览在http.conf中,去除LimitExcept项。最终结果如下:IfModulemod_dav_svn.cLocation/repos/testDAVsvnSVNPath/home/SVN/testAuthTypeBasicAuthNameSVNRepositoryfortestAuthUserFile/srv/svn/user_access/test_passwdfileRequirevalid-user/Location/IfModule按目录授权配置定义授权控制描述于文件/home/SVN/test/conf/authz。具体内容如下:[aliases][groups]g_admin=iang_all=xfy,jyz,ian[/]@g_admin=rw[/trunk]@g_all=r[/share]@g_all=rw[/private]ian=r[/private/rpp]ian=rwxfy=rjyz=r[/private/mbb]ian=rwjyz=rw[/private/wtt]xfy=rw[/private/uii]xfy=rw在http.conf中,使用AuthzSVNAccessFile指定/home/SVN/test/conf/authz为授权控制文件。最终结果如下:IfModulemod_dav_svn.cLocation/repos/testDAVsvnSVNPath/home/SVN/testAuthTypeBasicAuthNameSVNRepositoryfortestAuthUserFile/srv/svn/user_access/test_passwdfileAuthzSVNAccessFile/home/SVN/test/conf/authz#PerlAuthenHandlerIpAuthRequirevalid-user/Location/IfModule测试拥有管理员身份的ian,可以读取整个库。(写未测试)ian@Suse-hww:~svn--usernameianco:Awebsvn-test/shareAwebsvn-test/trunkAwebsvn-test/trunk/test.cAwebsvn-test/trunk/new_from_win32.txtAwebsvn-test/privateAwebsvn-test/private/uiiAwebsvn-test/private/uii/uii_by_ian.txtAwebsvn-test/private/mbbAwebsvn-test/private/rppAwebsvn-test/private/wttAwebsvn-test/private/wtt/from_xfy.txtCheckedoutrevision6.对根目录没有任何权限的jzy,不能读取整个库。ian@Suse-hww:~rm-rfwebsvn-test/ian@Suse-hww:~svn--usernamejyzco::svn:Serversentunexpectedreturnvalue(403Forbidden)inresponsetoOPTIONSrequestfor'对/trunk具有只读权限、对/share具有读写权限的jzy,可以读取这2个目录。ian@Suse-hww:~mkdirwebsvn-testian@Suse-hww:~svn--usernamejyzco::Awebsvn-test/trunk/test.cAwebsvn-test/trunk/new_from_win32.txtCheckedoutrevision6.ian@Suse-hww:~svn--usernamejyzco对/private没有任何权限的jzy,不能读取该目录。ian@Suse-hww:~svn--usernamejyzco:Serversentunexpectedreturnvalue(403Forbidden)inresponsetoOPTIONSrequestfor'对/private/rpp具有只读权限、对/private/rpp具有读写权限的jzy,可以读取这2个目录。ian@Suse-hww:~mkdirwebsvn-test/privateian@Suse-hww:~svn--usernamejyzco@Suse-hww:~svn--usernamejyzco对/private/wtt、/private/uii没有任何权限的jzy,不能读取这2个目录。ian@Suse-hww:~svn--usernamejyzco:Serversentunexpectedreturnvalue(403Forbidden)inresponsetoOPTIONSrequestfor'@Suse-hww:~svn--usernamejyzco:Serversentunexpectedreturnvalue(403Forbidden)inresponsetoOPTIONSrequestfor'对/private/mbb具有读写权限的jzy,可以写入该目录。ian@Suse-hww:~cattextfromjyzwebsvn-test/private/mbb/from_jyz.txtcat:textfromj

1 / 13
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功