{"id":257,"date":"2026-01-23T09:29:18","date_gmt":"2026-01-23T09:29:18","guid":{"rendered":"https:\/\/blog.gpst.net.cn:4008\/?p=257"},"modified":"2026-01-28T06:24:14","modified_gmt":"2026-01-28T06:24:14","slug":"svn%e8%bf%90%e7%bb%b4-%e6%90%ad%e5%bb%baapachesubversion","status":"publish","type":"post","link":"https:\/\/opshub.com.cn\/?p=257","title":{"rendered":"svn\u8fd0\u7ef4\u2014\u2014\u642d\u5efaapache+subversion"},"content":{"rendered":"\n<p>\u5b89\u88c5subversion<\/p>\n\n\n\n<p><a href=\"https:\/\/dlcdn.apache.org\/subversion\/subversion-1.14.3.tar.bz2\">https:\/\/dlcdn.apache.org\/subversion\/subversion-1.14.3.tar.bz2<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/configure --prefix=\/opt\/svn &amp;&amp; make &amp;&amp; make install<\/code><\/pre>\n\n\n\n<p>\u5b89\u88c5Apache\/2.4.57 (Unix)<\/p>\n\n\n\n<p><a href=\"https:\/\/dlcdn.apache.org\/httpd\/httpd-2.4.58.tar.gz\u7f16\u8bd1\u53c2\u6570\uff1a\">https:\/\/dlcdn.apache.org\/httpd\/httpd-2.4.58.tar.gz<\/a><\/p>\n\n\n\n<p>\u7f16\u8bd1\u53c2\u6570\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/configure --prefix=\/opt\/httpd --enable-so --enable-rewrite --with-included-apr --enable-mods-shared=most --enable-dav --enable-dav-fs\nmake &amp;&amp; make install<\/code><\/pre>\n\n\n\n<p>apache\u914d\u7f6e\u6587\u4ef6httpd.conf:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>User svn\nGroup svn\nLoadModule dav_svn_module     modules\/mod_dav_svn.so\nLoadModule authz_svn_module   modules\/mod_authz_svn.so\nInclude conf\/extra\/httpd-svn.conf<\/code><\/pre>\n\n\n\n<p>http-svn.conf:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Location \/svn&gt;\n  DAV svn\n  SVNParentPath \/var\/svn\n  AuthType Basic\n  AuthName \"Please input Username and Password\"\n  AuthUserFile \/var\/svn\/passwd\n  AuthzSVNAccessFile \/var\/svn\/authz\n  Require valid-user\n&lt;\/Location&gt;<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>SVNParentPath<\/strong> \u6307\u5b9a\u4e86 SVN \u4ed3\u5e93\u7684\u6839\u76ee\u5f55\u3002<\/li>\n\n\n\n<li><strong>AuthType<\/strong>, <strong>AuthName<\/strong>, <strong>AuthUserFile<\/strong> \u548c <strong>Require<\/strong> \u7528\u4e8e\u914d\u7f6e\u57fa\u672c\u8eab\u4efd\u9a8c\u8bc1\uff0c\u786e\u4fdd\u53ea\u6709\u7ecf\u8fc7\u8eab\u4efd\u9a8c\u8bc1\u7684\u7528\u6237\u53ef\u4ee5\u8bbf\u95ee SVN \u4ed3\u5e93\u3002\u8bf7\u66ff\u6362 <strong>SVNParentPath<\/strong> \u548c <strong>AuthUserFile<\/strong> \u4e3a\u60a8\u7684 SVN \u4ed3\u5e93\u548c\u5bc6\u7801\u6587\u4ef6\u7684\u5b9e\u9645\u8def\u5f84\u3002<\/li>\n\n\n\n<li><strong>\u521b\u5efa\u5bc6\u7801\u6587\u4ef6\uff1a<\/strong> \u4f7f\u7528 <strong>htpasswd<\/strong> \u5de5\u5177\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u8eab\u4efd\u9a8c\u8bc1\u7684\u5bc6\u7801\u6587\u4ef6\u3002\u4f8b\u5982\uff1a<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/httpd\/bin\/htpasswd -c \/var\/svn\/passwd \u5f20\u4e91\u7693<\/code><\/pre>\n\n\n\n<p>\/var\/svn\/svnserve.conf:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;general]\nanon-access = none\nauth-access = write\npassword-db = passwd\nauthz-db = authz\n&#091;sasl]<\/code><\/pre>\n\n\n\n<p>\/var\/svn\/authz\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;aliases]\n&#091;groups]\nadmins=root\n&#091;\/]\n@admins = rw\n&#091;docs:\/]\n\u5f20\u4e91\u7693 = rw\n&#091;apps:\/]\n\u5f20\u4e91\u7693 = rw\n&#091;videos:\/]\n\u5f20\u4e91\u7693 = rw<\/code><\/pre>\n\n\n\n<p>\u521b\u5efa\u4ed3\u5e93\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/var\/svn\n\/opt\/svn\/bin\/svnadmin create docs\n\/opt\/svn\/bin\/svnadmin create apps\nchown -R svn:svn docs\nchown -R svn:svn apps\nchown -R svn:svn \/var\/svn<\/code><\/pre>\n\n\n\n<p>\u914d\u7f6e\u597d\u4e86\u4ee5\u540e\uff0c\u91cd\u542fapache<br>nginx\u53cd\u5411\u4ee3\u7406ssl\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen 8121 ssl;\n    server_name svn.apollo-sun.online;\n    ssl_certificate config.d\/ssl\/svn.apollo-sun.online.cer;\n    ssl_certificate_key config.d\/ssl\/svn.apollo-sun.online.key;\n    ssl_session_timeout  5m;\n    ssl_prefer_server_ciphers  on;\n    ssl_protocols TLSv1.2 TLSv1.3;\n    ssl_ciphers HIGH:!aNULL:!MD5;\n    ssl_session_cache shared:SSL1:10m;\n\n\n    location \/ {\n        proxy_pass http:\/\/127.0.0.1:80;\n        proxy_set_header Host $host;\n        proxy_set_header X-Real-IP $remote_addr;\n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header X-Forwarded-Proto https;\n    }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5subversion https:\/\/dlcdn.apache.org\/subversion\/subversion-1.14.3.tar.bz2 \u5b89\u88c5Apache\/2.4.57 (Unix) https:\/\/dlcdn.apache.org\/httpd\/httpd-2.4.58.tar.gz \u7f16\u8bd1\u53c2\u6570\uff1a apache\u914d\u7f6e\u6587\u4ef6httpd.conf: http-svn.conf: \/var\/svn\/svnserve.conf: \/var\/svn\/authz\uff1a \u521b\u5efa\u4ed3\u5e93\uff1a \u914d\u7f6e\u597d\u4e86\u4ee5\u540e\uff0c\u91cd\u542fapachenginx\u53cd\u5411\u4ee3\u7406ssl\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-257","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=257"}],"version-history":[{"count":2,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":638,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/257\/revisions\/638"}],"wp:attachment":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}