{"id":1722,"date":"2017-11-09T11:14:02","date_gmt":"2017-11-09T03:14:02","guid":{"rendered":"https:\/\/zoco.me\/?p=64"},"modified":"2017-11-09T11:14:02","modified_gmt":"2017-11-09T03:14:02","slug":"linux-server-build-svn-server","status":"publish","type":"post","link":"https:\/\/cloudbool.com\/archive\/linux-server-build-svn-server.html","title":{"rendered":"Linux\u670d\u52a1\u5668\u642d\u5efaSVN\u670d\u52a1\u7aef"},"content":{"rendered":"<p>\u51fa\u4e8e\u548c\u540c\u4e8b\u5408\u4f5c\uff0c\u4ee5\u53ca\u7248\u672c\u63a7\u5236\u53ca\u4ee3\u7801\u5907\u4efd\uff0c\u4e00\u76f4\u6709\u81ea\u884c\u5efa\u7acbSVN\u670d\u52a1\u5668\u7684\u9700\u6c42\u3002\u4e4b\u524d\u4e00\u76f4\u5728\u7f51\u4e0a\u627e\u5404\u79cd\u8d44\u6599\uff0c\u60f3\u5728\u6211\u4eec\u81ea\u5df1\u7684\u670d\u52a1\u5668\u4e0a\u5b89\u88c5SVN\u670d\u52a1\u5668\uff0c\u4f46\u662f\u5404\u79cd\u8d44\u6599\u76f8\u5bf9\u6765\u8bf4\u90fd\u4e0d\u662f\u5f88\u6ee1\u8db3\u6211\u7684\u9700\u6c42\uff0c\u89e3\u51b3\u4e4b\u540e\uff0c\u8fd8\u662f\u60f3\u505a\u4e2a\u8bb0\u5f55\uff0c\u7ed9\u81ea\u5df1\u53ca\u540e\u6765\u8005\u7559\u4e2a\u53c2\u8003\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u8fd8\u662f\u8001\u6837\u5b50\uff0c\u6211\u662f\u5728CentOS7\u4e0b\u914d\u7f6eSVN\u670d\u52a1\u5668\u7684\u3002\u5176\u5b9e\u9664\u4e86\u5b89\u88c5SVN\u5305\u7565\u6709\u5dee\u522b\u4e4b\u5916\uff0c\u522b\u7684Linux\u53d1\u884c\u7248\u4e5f\u5dee\u4e0d\u591a\uff0c\u6240\u4ee5\u8fd9\u4e9b\u8bb0\u5f55\u4e5f\u9002\u5408\u522b\u7684\u53d1\u884c\u7248\u3002<\/p>\n<h3>\u5b89\u88c5SVN<\/h3>\n<p>\u5b89\u88c5SVN\u5305\uff1a<\/p>\n<blockquote><p>\n  yum install subversion -y\n<\/p><\/blockquote>\n<p>\u67e5\u770bSVN\u7248\u672c\uff1a<\/p>\n<blockquote><p>\n  svn &#8211;version &#8211;quiet\n<\/p><\/blockquote>\n<h3>\u521b\u5efaSVN\u9879\u76ee<\/h3>\n<p>\u56e0\u4e3a\u6211\u4eec\u9664\u4e86PHP\uff0c\u8fd8\u6709iOS\u53ca\u5b89\u5353\u7aef\u4ee3\u7801\u4ed3\u5e93\uff0c\u8fd8\u6709\u4e2a\u548cUI\u8bbe\u8ba1\u5e08\u5171\u540c\u5171\u4eab\u6587\u4ef6\u7684\u4e13\u95e8SVN\u4ed3\u5e93\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u5728\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u642d\u5efa\u591a\u4e2aSVN\u4ed3\u5e93\uff0c\u6240\u4ee5\uff0c\u6211\u4eec\u9700\u8981\u4f60\u4e2a\u4e13\u95e8\u7684\u76ee\u5f55\u6765\u653e\u7f6e\u6240\u6709\u7684SVN\u4ee3\u7801\u4ed3\u5e93\uff0c\u6211\u7684\u4e60\u60ef\u662f\u653e\u5728<strong><em>\/var\/svn\/<\/em><\/strong>\uff0c\u521b\u5efa\u9879\u76ee\u6587\u4ef6\u5939\uff1a<\/p>\n<blockquote><p>\n  mkdir \/var\/svn\n<\/p><\/blockquote>\n<p>\u521b\u5efa\u9879\u76ee\uff0c\u5047\u8bbe\u4ed3\u5e93\u540d\u53ebUI\uff1a<\/p>\n<blockquote><p>\n  cd \/var\/svn\/<br \/>\n  svnadmin create ui\n<\/p><\/blockquote>\n<h4>\u521b\u5efa\u7528\u6237<\/h4>\n<p>\u6253\u5f00password\u6587\u4ef6\uff0c\u6309\u7167\u6ce8\u91ca\u4e0a\u7684\u4f8b\u5b50\uff0c\u6211\u4eec\u5728\u91cc\u9762\u65b0\u5efa\u5bf9\u5e94\u7684\u7528\u6237\uff0c\u6bd4\u5982\u8bf4\uff1a<\/p>\n<pre><code>user1 = password1\nuser2 = password2\n<\/code><\/pre>\n<h4>\u7528\u6237\u6743\u9650\u63a7\u5236<\/h4>\n<p>\u6253\u5f00authz\u6587\u4ef6\uff0c\u5c06\u7528\u6237\u540d\u53ca\u5bc6\u7801\u4fe1\u606f\u8f93\u5165\uff0c\u6bd4\u5982\u8bf4\uff1a<\/p>\n<blockquote><p>\n  cd conf<br \/>\n  vim authz\n<\/p><\/blockquote>\n<pre><code>write = user1\nread = user2,user3\n\n[\/]\n@write = rw\n@read = r\n<\/code><\/pre>\n<p>\u8fd9\u6837\u53ef\u4ee5\u7cbe\u7ec6\u63a7\u5236\u5bf9\u5e94\u7684\u7528\u6237\u62e5\u6709\u4ec0\u4e48\u6837\u7684\u6743\u9650\uff0c\u8be6\u7ec6\u7684\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e0a\u65b9\u90fd\u6709\u6ce8\u91ca\uff0c\u9605\u8bfb\u4e00\u4e0b\u5c31\u80fd\u770b\u61c2\u4e86\u3002<\/p>\n<h4>\u8bbf\u95ee\u6743\u9650\u63a7\u5236<\/h4>\n<p>\u5c06svnserve.conf\u6587\u4ef6\u4e2d\u7684\u4e0b\u9762\u51e0\u884c\u5f00\u5934\u6ce8\u91ca\u53bb\u6389\uff0c\u4f7f\u4e0a\u8ff0\u914d\u7f6e\u751f\u6548\uff1a<\/p>\n<pre><code>anon-access = none\nauth-access = write\npassword-db = passwd\nauthz-db = authz\n<\/code><\/pre>\n<p>\u5230\u8fd9\u4e00\u6b65\u4e00\u4e2a\u5b8c\u6574\u7684\u4ed3\u5e93\u5c31\u5efa\u7acb\u6210\u529f\u4e86\uff0c\u5982\u679c\u9700\u8981\u591a\u4e2a\u9879\u76ee\uff0c\u53ef\u4ee5\u4ece\u4e0a\u8ff0\u521b\u5efa\u4ed3\u5e93\u547d\u4ee4\u5f00\u59cb\uff0c\u518d\u6b21\u6267\u884c\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u5c31\u80fd\u5728\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u5efa\u7acb\u591a\u4e2aSVN\u4ed3\u5e93\u3002<\/p>\n<h3>\u542f\u52a8SVN\u670d\u52a1\u5668<\/h3>\n<p>\u6211\u4eec\u9700\u8981\u542f\u52a8\u4e00\u4e2a\u8fdb\u7a0b\uff0c\u5230\u540e\u53f0\u76d1\u542c\u6765\u81ea\u5ba2\u6237\u7aef\u7684\u8bf7\u6c42\u3002<\/p>\n<p>\u6211\u4eec\u4e0a\u9762\u8bf4\u4e86\uff0c\u6211\u4eec\u9700\u8981\u5728\u4e00\u53f0\u670d\u52a1\u5668\u4e0a\u5efa\u7acb\u591a\u4e2aSVN\u4ed3\u5e93\uff0c\u6240\u4ee5SVN\u670d\u52a1\u5668\u76d1\u542c\u7684\u8def\u5f84\u4e5f\u662f\u6211\u4eec\u4e0a\u9762\u5efa\u7acb\u7684\u90a3\u4e2aSVN\u603b\u76ee\u5f55\uff0c\u6211\u4eec\u4e0a\u9762\u5efa\u7acb\u7684SVN\u9879\u76ee\u603b\u76ee\u5f55\u662f<strong><em>\/var\/svn\/<\/em><\/strong>\uff0c\u6240\u4ee5\uff0c\u8fdb\u7a0b\u542f\u52a8\u547d\u4ee4\u662f\uff1a<\/p>\n<blockquote><p>\n  \/usr\/bin\/svnserve -d -r \/var\/svn\/\n<\/p><\/blockquote>\n<h3>\u5ba2\u6237\u7aef\u8fde\u63a5<\/h3>\n<p>\u56e0\u4e3a\u6211\u4eec\u6ca1\u6709\u914d\u7f6eHTTPS\u7b49\u534f\u8bae\u8fdb\u884cSVN\u8fde\u63a5\uff0c\u6240\u4ee5\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528SVN\u534f\u8bae\u8ba9\u672c\u5730\u5ba2\u6237\u7aef\u4e0eSVN\u670d\u52a1\u5668\u8fdb\u884c\u901a\u4fe1\uff0c\u672c\u5730SVN\u5ba2\u6237\u7aef\u8bbf\u95eeSVN\u670d\u52a1\u5668\u5730\u5740\u683c\u5f0f\u4e3a\uff1a<\/p>\n<blockquote><p>\n  svn:\/\/hostname_or_ip\/repo_name\n<\/p><\/blockquote>\n<p>\u5176\u4e2dhostname_or_ip\u662f\u670d\u52a1\u5668\u7684\u57df\u540d\u6216\u8005IP\uff0crepo_name\u662f\u5bf9\u5e94\u7684\u4ed3\u5e93\u540d\u79f0\uff0c\u540e\u9762\u8981\u6c42\u8f93\u5165\u7684\u7528\u6237\u540d\u53ca\u5bc6\u7801\u662f\u5728password\u6587\u4ef6\u4e2d\u8bbe\u7f6e\u7684\u3002<\/p>\n<p>\u5230\u8fd9\u91cc\uff0c\u6211\u4eec\u7684SVN\u670d\u52a1\u5668\u5c31\u5efa\u7acb\u5b8c\u6210\u4e86\uff0c\u540e\u9762\u6d89\u53ca\u5230\u7684hooks\u7b49\u4e8b\u4ef6\u6709\u65f6\u95f4\u518d\u8bb0\u5f55\u4e00\u4e0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u51fa\u4e8e\u548c\u540c\u4e8b\u5408\u4f5c\uff0c\u4ee5\u53ca\u7248\u672c\u63a7\u5236\u53ca\u4ee3\u7801\u5907\u4efd\uff0c\u4e00\u76f4\u6709\u81ea\u884c\u5efa\u7acbSVN\u670d\u52a1\u5668\u7684\u9700\u6c42\u3002\u4e4b\u524d\u4e00\u76f4\u5728\u7f51\u4e0a\u627e\u5404\u79cd\u8d44\u6599\uff0c\u60f3\u5728\u6211\u4eec\u81ea &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/cloudbool.com\/archive\/linux-server-build-svn-server.html\"> <span class=\"screen-reader-text\">Linux\u670d\u52a1\u5668\u642d\u5efaSVN\u670d\u52a1\u7aef<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[8],"tags":[17,101],"class_list":["post-1722","post","type-post","status-publish","format-standard","hentry","category-tech","tag-centos","tag-svn"],"_links":{"self":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/1722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/comments?post=1722"}],"version-history":[{"count":0,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/1722\/revisions"}],"wp:attachment":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/media?parent=1722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/categories?post=1722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/tags?post=1722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}