{"id":162,"date":"2022-06-14T16:46:44","date_gmt":"2022-06-14T08:46:44","guid":{"rendered":"http:\/\/10.0.102.231\/?p=162"},"modified":"2022-06-17T09:17:42","modified_gmt":"2022-06-17T01:17:42","slug":"if-svnadmin%e6%90%ad%e5%bb%ba%e7%ac%94%e8%ae%b0","status":"publish","type":"post","link":"https:\/\/www.rchen.top\/?p=162","title":{"rendered":"if.svnadmin\u642d\u5efa\u7b14\u8bb0"},"content":{"rendered":"<p><b>\u7b80\u4ecb\uff1a<\/b><\/p>\n<p>linux\u4e0b\u7684Subversion\u6ca1\u6709\u56fe\u5f62\u5316\u754c\u9762\uff0c\u5728\u7ba1\u7406\u7528\u6237\u548c\u914d\u7f6e\u6743\u9650\u4e0a\u4e0d\u662f\u5f88\u76f4\u89c2\u3002\u4e3a\u4e86\u4fbf\u4e8e\u64cd\u4f5c\u53ef\u4ee5\u642d\u914diF.SVNAdmin\u8fdb\u884c\u7ba1\u7406\u3002<\/p>\n<p>iF.SVNAdmin \u662f\u4e00\u4e2a\u57fa\u4e8e Web \u7684\uff0c\u7528\u6765\u7ba1\u7406 Subversion \u7684\u8ba4\u8bc1\u6587\u4ef6\u7684\u9879\u76ee\u3002\u65e0\u9700\u6570\u636e\u5e93\u652f\u6301\uff0c\u76f4\u63a5\u5bf9 Subversion \u7684\u8ba4\u8bc1\u6587\u4ef6\u548c\u7528\u6237\u8ba4\u8bc1\u6587\u4ef6\u8fdb\u884c\u8bbe\u7f6e\uff0c\u652f\u6301 LDAP\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u7528\u6765\u521b\u5efa\u548c\u5220\u9664\u7248\u672c\u5e93\uff0c\u4ee5\u53ca\u5bf9\u7248\u672c\u5e93\u8fdb\u884c\u6d4f\u89c8\u3002<\/p>\n<p><b>1<\/b><b>\u3001\u57fa\u7840\u73af\u5883\u642d\u5efa\uff1a<\/b><\/p>\n<p><i>\u8f6f\u4ef6\u7248\u672c<\/i><\/p>\n<p><i>CentOS Linux release 7.7.1908 (Core)<\/i><\/p>\n<p><i>Apache\/2.4.6<\/i><\/p>\n<p><i>PHP 5.4.16 (cli) <\/i><\/p>\n<p><i>svnserve, version 1.7.14 (r1542130)<\/i><\/p>\n<p>\u5173\u95ed\u9632\u706b\u5899\uff0cselinux \uff0c\u5b89\u88c5apache\uff0csvn, php \u8fd9\u51e0\u4e2a\u7ec4\u4ef6<\/p>\n<p>yum install httpd<\/p>\n<p>yum install mod_dav_svn<\/p>\n<p>yum install subversion<\/p>\n<p>yum install php<\/p>\n<p><b>2<\/b><b>\u3001<\/b><b>\u7f16\u8f91apache\u914d\u7f6e\u6587\u4ef6<\/b><\/p>\n<p>vi \/etc\/httpd\/conf.d\/subversion.conf<\/p>\n<p>&lt;Location \/svn&gt;<br \/>\nDAV svn<br \/>\nSVNParentPath \/var\/www\/svn #\u4ed3\u5e93\u9879\u76ee\u8def\u5f84\u53ef\u4ee5\u81ea\u5b9a\u4e49<\/p>\n<p>AuthType Basic<br \/>\nAuthName &#8220;Subversion repository&#8221;<br \/>\nAuthUserFile \/var\/www\/svnconfig\/passwdfile<br \/>\nAuthzSVNAccessFile \/var\/www\/svnconfig\/accessfile<br \/>\nRequire valid-user<br \/>\n&lt;\/Location&gt;<\/p>\n<p><b>3<\/b><b>\u3001<\/b><b>\u521b\u5efa\u5b58\u653eSVN\u76ee\u5f55\u548c\u6743\u9650\u4fe1\u606f\uff1a<\/b><\/p>\n<p>mkdir -p \/var\/www\/svn&nbsp;&nbsp;&nbsp;&nbsp; #\u4ed3\u5e93\u9879\u76ee\u8def\u5f84\u53ef\u4ee5\u81ea\u5b9a\u4e49<br \/>\nmkdir -p&nbsp; \/var\/www\/svnconfig&nbsp; #ifsvnadmin\u8d26\u6237\u6743\u9650\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>chown -R apache:apache \/var\/www\/svn<\/p>\n<p>touch \/var\/www\/svnconfig\/accessfile<br \/>\ntouch \/var\/www\/svnconfig\/passwdfile<br \/>\nchown -R apache:apache \/var\/www\/html\/svnadmin\/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #\u66f4\u6539\/var\/www\/html\/svnadmin\/\u6743\u5c5e<br \/>\nchmod 777 \/var\/www\/svnconfig\/accessfile<br \/>\nchmod 777 \/var\/www\/svnconfig\/passwdfile<\/p>\n<p>4\u3001\u5b89\u88c5iF.SVnAdmin<\/p>\n<p>\u8f6f\u4ef6\u4e0b\u8f7d\u5730\u5740 <a href=\"http:\/\/svnadmin.insanefactory.com\/\">http:\/\/svnadmin.insanefactory.com\/<\/a><\/p>\n<p>unzip svnadmin-1.6.2.zip<br \/>\n\u628a\u89e3\u538b\u540e\u7684\u6587\u4ef6 iF.SVNAdmin-stable-1.6.2\u8003\u8d1d \u5230\/var\/www\/html\/svnadmin<br \/>\n\u66f4\u6539data\u76ee\u5f55\u7684\u8bfb\u5199\u6a21\u5f0f<br \/>\n# chmod -R 777 \/var\/www\/html\/svnadmin\/data\/<\/p>\n<p>5\u3001\u767b\u9646web\u7aef<\/p>\n<p>\u542f\u52a8httpd\u670d\u52a1<\/p>\n<p>systemctl start httpd<\/p>\n<p><a href=\"https:\/\/link.jianshu.com\/?t=http:\/\/192.168.30.43\/svnadmin\/\">http:\/\/ip\/svnadmin\/<\/a><br \/>\n\u9ed8\u8ba4\u8d26\u6237\u5bc6\u7801\uff1aadmin\/admin<\/p>\n<p>\u8fdb\u5165\u7f51\u9875\u540e\u9700\u8981\u5148\u586b\u5199\u53c2\u6570\u4fe1\u606f\uff1a<\/p>\n<p>Subversion authorization file&nbsp; \/\/\/var\/www\/svnconfig\/accessfile\u6743\u9650\u6587\u4ef6<\/p>\n<p>User authentication file (SVNUserFile) \/\/\/var\/www\/svnconfig\/passwdfile\u8d26\u6237\u4fe1\u606f\u6587\u4ef6<\/p>\n<p>Parent directory of the repositories (SVNParentPath)&nbsp; \/\/svn\u4ed3\u5e93\u9879\u76ee<\/p>\n<p>Subversion client executable&nbsp;&nbsp; \/usr\/bin\/svn<\/p>\n<p>Subversion admin executable&nbsp;&nbsp;&nbsp; \/usr\/bin\/svnadmin<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-166\" src=\"http:\/\/www.rchen.top\/wp-content\/uploads\/2022\/05\/\u672a\u547d\u540d\u56fe\u7247.png\" alt=\"\" width=\"1920\" height=\"940\"><\/p>\n<p>\u6269\u5c55\u77e5\u8bc6\u70b9\uff1a<\/p>\n<p>svn\u4e3b\u8981\u6709\u4e24\u79cd\u8bbf\u95ee\u65b9\u5f0f\uff1asvn\u548chttp\u65b9\u5f0f,\u662f\u4e24\u79cd\u4e0d\u540c\u7684\u8bbf\u95ee\u534f\u8bae\uff0c\u6839\u636e\u540e\u53f0\u542f\u52a8\u7684\u65b9\u5f0f\u6765\u533a\u5206<\/p>\n<p><b>\u65b9\u5f0f\uff1a<\/b>1\uff09svn\u534f\u8bae\u8bbf\u95ee\uff0c\u542f\u52a8svn\u670d\u52a1svnserve -d -r \/root\/svnrepo,\u5ba2\u6237\u7aef\u53ef\u4ee5\u901a\u8fc7svn\u534f\u8bae\u8bbf\u95ee\uff0c\u5bf9\u5e94\u7684\u8bbf\u95ee\u65b9\u5f0f\uff1aURL\uff1asvn:\/\/10.0.102.176\/\u9879\u76ee\u8def\u5f84\uff0c\u6743\u9650\u53ca\u7528\u6237\u6570\u636e\u5b58\u50a8\u5728authz\u548cpasswd\u6587\u4ef6\u5185\uff1b<\/p>\n<p><b>\u65b9\u5f0f\uff1a<\/b>2\uff09httpd\u670d\u52a1\uff0c\u5ba2\u6237\u7aef\u53ef\u4ee5\u901a\u8fc7http\u534f\u8bae\u8bbf\u95ee\uff0c\u5bf9\u5e94\u7684\u7248\u672c\u5e93URL\uff1ahttp:\/\/10.0.102.176\/svn\/\u9879\u76ee\u8def\u5f84\uff0c\u540e\u53f0\u7ba1\u7406\u8fdb\u7a0b\u4e3b\u8981\u662fapchace\u5b88\u62a4\uff1b\u6743\u9650\u53ca\u7528\u6237\u6570\u636e\u5b58\u50a8\u5728ifsvnadmin \u8bbe\u7f6e\u7684accessfile\u548cpasswdfile\u4e2d\uff1b<\/p>\n<p>\u4e24\u79cd\u65b9\u5f0f\u5728\u4e00\u53f0svn\u670d\u52a1\u5668\u53ef\u4ee5\u540c\u65f6\u8bbf\u95ee\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0chttp\u8bbf\u95ee\u662f\u6709apache\u8fdb\u7a0b\u5b88\u62a4\uff0c\u6240\u4ee5\u751f\u6210\u7684svn\u6570\u636e\u6240\u6709\u8005\u662fapache\uff0c\u672a\u6765\u4fdd\u8bc1\u9879\u76ee\u6570\u636e\u7684\u6240\u6709\u8005\u4e00\u81f4\uff0csvn\u670d\u52a1\u542f\u52a8\u4e5f\u9700\u8981\u901a\u8fc7apache\u7528\u6237\u8fdb\u884c\u542f\u52a8\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb\uff1a linux\u4e0b\u7684Subversion\u6ca1\u6709\u56fe\u5f62\u5316\u754c\u9762\uff0c\u5728\u7ba1\u7406\u7528\u6237\u548c\u914d\u7f6e\u6743\u9650\u4e0a\u4e0d\u662f\u5f88\u76f4\u89c2\u3002\u4e3a\u4e86\u4fbf\u4e8e\u64cd\u4f5c\u53ef\u4ee5\u642d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":487,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[113,114,22],"class_list":["post-162","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-96","tag-svn","tag-114","tag-22"],"_links":{"self":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=162"}],"version-history":[{"count":6,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/162\/revisions"}],"predecessor-version":[{"id":514,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/posts\/162\/revisions\/514"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=\/wp\/v2\/media\/487"}],"wp:attachment":[{"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rchen.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}