\r\n1.svn\u670d\u52a1\u7aef\u7684\u8fd0\u884c\u65b9\u5f0f\uff1a\r\n 1\uff0c\u72ec\u7acb\u670d\u52a1\u5668\uff1asvn:\/\/www.snv.com\/sadoc # sadoc \u9879\u76ee\r\n 2\uff0c\u501f\u52a9Apache\uff1ahttp:\/\/www.svn.com\/addoc\r\n 3\uff0c\u672c\u5730\u76f4\u63a5\u8bbf\u95ee\uff1afile:\/\/\/application\/svn\/sadoc #\u4e24\u4e2a\/\/ \u540e\u9762\u7684\u5c31\u662f\u7edd\u5bf9\u8def\u5f84\r\n<\/pre>\n\r\n2.Linux\u4e0a\u642d\u5efa\u6b65\u9aa4\uff1a\r\n\u5b89\u88c5\uff1a \r\n yum -y install subversion\r\n\u521b\u5efasvn\u7684\u7248\u672c\u5e93\u7684\u6839\u76ee\u5f55\u548c\u5bc6\u7801\u6743\u9650\u76ee\u5f55\uff1a\r\n mkdir -p \/application\/svndata\r\n mkdir -p \/application\/svnpasswd\r\n \r\n\u542f\u52a8\uff0c\u6307\u5b9asvn\u7684\u6839\u76ee\u5f55\r\n svnserve -d -r \/application\/svndata (-d: \u540e\u53f0\u8fd0\u884c\uff0c-r:\u8def\u5f84\uff09\r\n \r\n\u67e5\u770b\u8fdb\u7a0b\u662f\u5426\u542f\u52a8\uff1a\r\n ps -ef |grep svn\r\n netstat -plnt |grep 3690 (svn\u7684\u7aef\u53e3\u53f7\u662f3690)\r\n lsof -i tcp:3690 (\u6216\u8005\uff1alsof -i :3690)\r\n<\/pre>\n \r\n\u5efa\u7acb\u7248\u672c\u5e93\uff1a\r\n svnadmin create \/application\/svndata\/sadoc (\u4e5f\u53ef\u4ee5\u7406\u89e3\u4e3a\u662f\u4e00\u4e2a\u9879\u76ee\uff0c\u8fd9\u4e2a\u76ee\u5f55\u4e0d\u80fd\u7528mkdir\u6765\u521b\u5efa\uff0c\u56e0\u4e3asvn\u6709\u81ea\u5df1\u8fd0\u884c\u65b9\u5f0f\uff0c\u4f1a\u521b\u7acb\u5c5e\u4e8esvn\u81ea\u5df1\u5f88\u591a\u7684\u6587\u4ef6)\r\n tree \/application\/svndata\/ (\u8fd9\u65f6\u4f1a\u53d1\u73b0sadoc\u91cc\u9762\u4f1a\u591a\u4e86\u5f88\u591a\u7684\u5185\u5bb9)\r\n<\/pre>\n\r\n\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff1a\r\n cd \/application\/svndata\/sadoc\/conf\r\n cp svnserve.conf svnserve.conf.bak\r\n \r\n egrep \"\\-access|\\-db=\" svnserve.conf (egrep\u53ef\u4ee5\u540c\u65f6\u8fc7\u6ee4\u4e24\u4e2a\u5b57\u7b26\u4e32=grep -E)\r\n \u6539\u6210\uff1a(\u90fd\u8981\u9876\u683c\u5199\u4ee5\u4e0b\u5185\u5bb9)\r\n [general]\r\n anon-access=none \u4e0d\u5141\u8bb8\u533f\u540d\u8bbf\u95ee\r\n auth-access=write \u5141\u8bb8\u7684\u53ef\u4ee5\u5199\r\n password-db = \/application\/svnpasswd\/passwd \u6307\u5b9a\u7528\u6237-\u5bc6\u7801\u7684\u6587\u4ef6\r\n authz-db = \/application\/svnpasswd\/authz \u6307\u5b9a\u7528\u6237\u6743\u9650\u7684\u6587\u4ef6\r\n realm= this is project 1\r\n<\/pre>\n\r\n\u8bf4\u660e\uff1a\r\nanon-access = none #\u4e0d\u5141\u8bb8\u533f\u540d\u7528\u6237\u8bbf\u95ee\r\nauth-access = write #\u901a\u8fc7\u9a8c\u8bc1\u7684\u7528\u6237\u53ef\u4ee5\u8bfb\u548c\u5199\r\npassword-db = \/opt\/svn\/etc\/svn-user.conf #\u7528\u6237\u4fdd\u5b58\u6587\u4ef6\r\nauthz-db = \/opt\/svn\/etc\/svn-authz.conf #\u6743\u9650\u7ba1\u7406\u6587\u4ef6\r\nrealm = My First Repository #\u4ed3\u5e93\u540d\u79f0 \r\n\u4fee\u6539\u5bc6\u7801\u548c\u6743\u9650\u914d\u7f6e\u6587\u4ef6\uff1a\r\n cp \/apllication\/svndata\/sadoc\/conf\/passwd \/apllication\/svndata\/sadoc\/conf\/authz \/apllication\/svnpasswd\/\r\n cd \/apllication\/svnpasswd\/\r\n chmod 700 * (\u539f\u6765\u7684\u6743\u9650\u4e3a644\uff0c\u56e0\u4e3a\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u770b\u5230\uff0c\u56e0\u4e3asvn\u7684\u5bc6\u7801\u662f\u660e\u6587\u7684)\r\n vim passwd (\u672b\u884c\u6dfb\u52a0)\r\n oldboy = 111111\r\n test = 111111\r\n test = 222222\r\n vim authz (\u8fd9\u91cc\u53ef\u4ee5\u5b9a\u4e49\u7ec4\u4fe1\u606f\u3002\u6ce8\u610f\u3002\u8fd9\u91cc\u7684\u7ec4\u91cc\u7684\u6210\u5458\u5fc5\u987b\u662f\u5728passwd\u91cc\u5b9a\u4e49\u7684\uff0c\u4e0d\u662f\u968f\u4fbf\u5199\u7684\uff0c\u7ec4\u540d\u53ef\u4ee5\u968f\u4fbf\u8d77)\r\n ett_sa = oldboy,test1 (\u5b9a\u4e49\u4e00\u4e2a\u8fd0\u7ef4\u7ec4\uff1a\u6210\u5458\u4e3a\uff1aoldboy\u548ctest1\uff09\r\n ett_wangguan = test (\u5b9a\u4e49\u4e00\u4e2a\u7f51\u7ba1\u7ec4\uff0c\u6210\u5458\u4e3atest)\r\n [sadoc:\/] \uff08\u5b9a\u4e49\u9879\u76ee\u989d\u6743\u9650\uff1a \u9879\u76ee\u540d\u79f0sadoc,\u8868\u793a\u8be5\u9879\u76ee\u4e0b\u6240\u6709\u5185\u5bb9\u5141\u8bb8\u8c01\u53ef\u4ee5\u6709\u4ec0\u4e48\u6743\u9650\uff09\r\n @ett_sa = rw (\u5982\u679c\u662f\u5141\u8bb8\u67d0\u4e2a\u7ec4ett_sa\u6765\u8bbf\u95ee\uff0c\u5219\u524d\u9762\u8981\u52a0@\u8fd9\u4e2a\u7b26\u53f7\u6765\u6807\u8bc6\u4e0b)\r\n @ett_wangguan = r ( \u5141\u8bb8\u7f51\u7ba1\u7ec4\u6765\u67e5\u770b )\r\n test = r (\u5982\u679c\u662f\u7ed9\u67d0\u4e2a\u7528\u6237\u7684\u6743\u9650\uff0c\u5c31\u662f\u76f4\u63a5\u7528 \u201c \u6237\u540d = \u6743\u9650 \u201d\u7684\u683c\u5f0f)\r\n <\/pre>\n\r\n\u91cd\u542fsvn:\r\n pkill svnserve \r\n ps -ef |grep svn\r\n svnserve -d -r \/apllication\/svndata (\u8fd9\u91cc\u542f\u52a8\u5230svndata\u8fd9\u4e2a\u76ee\u5f55\uff0c\u6240\u4ee5\u5728\u5ba2\u6237\u65b9\u95ee\u7684URL\u4e2d\u672b\u5c3e\u7eed\u63a5\u4e0a\/sadoc \uff0c\u5373\u4e3a\uff1asvn:\/\/192.168.115.80\/sadoc)\r\n ps -ef |grep svn (\u52a0\u5165\u53ea\u67091\u4e2a\u9879\u76ee\u65f6\uff0c\u5c31\u53ef\u4ee5 svnserve ...\/application\/svndata\/sadoc ,\u8fd9\u65f6\u5728\u5ba2\u6237\u7aef\u8bbf\u95ee\u7684URL: svn:\/\/192.168.115.80 ) \r\n <\/pre>\n \r\n\u5c06svn\u52a0\u5165\u5230\u5f00\u673a\u542f\u52a8\r\n\u7f16\u8f91rc.local\u6587\u4ef6\uff1avi \/etc\/rc.d\/rc.local\r\n\u52a0\u5165\u5982\u4e0b\u542f\u52a8\u547d\u4ee4\uff1a\r\n\/usr\/local\/svn\/bin\/svnserve -d \u2013listen-port 9999 -r \/opt\/svn\r\n<\/pre>\n\u5ba2\u6237\u7aef\u5b89\u88c5\u914d\u7f6e\uff1a<\/strong><\/div>\n\r\n \r\n\u5b89\u88c5\uff1a\u4e0b\u8f7d\u4e4c\u9f9fsvn\u5728Windows\u4e0a\u5b89\u88c5,\u5b89\u88c5\u6c49\u5316\u7248\u7684\u8bed\u8a00\u5305\uff0c\u90fd\u662f\u4e00\u8def\u4e0b\u4e00\u6b65\u89e3\u51b3\r\n\u8fde\u63a5\uff1a\u5728d\u76d8\u91cc\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6\u5939\uff1asvn\u5ba2\u6237\u7aef---\u53f3\u51fb\uff1a\u9009\u62e9\uff1asvn-checkout\uff08\u68c0\u51fa\uff0c\u7b2c\u4e00\u6b21\u64cd\u4f5c\uff0c\u53ea\u6709\u8fd9\u4e2a\uff09\r\n \u586b\u4e0a\u521a\u914d\u7684\u670d\u52a1\u5668\u7684\u5730\u5740\uff1asvn:\/\/10.0.0.6\/sadoc\/ checkout\u7684\u5730\u5740W\u4e3a\uff1ad:svn\u5ba2\u6237\u7aef (\u63a8\u8350\u7528\u57df\u540d\uff0c\u4e0d\u7528ip\uff09\u91c7\u7528\u9ed8\u8ba4\uff1afull recursive (\u5b8c\u5168\u9012\u5f52)\r\n \u8f93\u5165\u7528\u6237\u660e\u548c\u5bc6\u7801\uff1a\uff08\u80fd\u51fa\u73b0\u8fd9\u4e00\u6b65\uff1a\u8bc1\u660e\u80fd\u8fde\u5230\u670d\u52a1\u5668\uff09 \uff1aoldboy\uff0c1111111 (\u8fd9\u65f6\u5c31\u4f1a\u591a\u51fa\u4e2a\u6587\u4ef6\u5939\uff0c\u5e76\u4e14\u91cc\u9762\u6709.svn\u7684\u9690\u85cf\u6587\u4ef6\uff09\r\n \r\nsvn\u63d0\u4ea4\u6d41\u7a0b\uff1a\r\n\u5728\u8fd9\u6587\u4ef6\u5939\u91cc\u65b0\u5efa\u4e00\u4e2a\u6587\u6863\uff08.svn\u6587\u4ef6\u5939\u7684\u540c\u7ea7\u76ee\u5f55\uff09\uff08\u5f53\u6210\u65b0\u4ee3\u7801\u63d0\u4ea4\uff09 \uff0c\u4f1a\u5230\u4e0a\u7ea7\u76ee\u5f55\uff08svncheckout\u751f\u6210\u7684\u76ee\u5f55\uff09\uff1a\u53f3\u952e\uff1a ,commit(\u63d0\u4ea4\uff09\r\n\u67e5\u770b\u670d\u52a1\u5668\u4e0a\u662f\u5426\u63d0\u4ea4\u4e0a\u53bb\uff1a\u53f3\u952e\uff08svncheckout\u751f\u6210\u7684\u76ee\u5f55\uff09--> TortoiseSVN ---> Repo-browser\r\n <\/pre>\n\r\nlinux\u5ba2\u6237\u7aef\u4e0a \u63d0\u53d6\u6570\u636e\u548c\u63d0\u4ea4\u6570\u636e\r\n\u5bfc\u51fa: svn chechkout svn:\/\/10.0.0.6\/sadoc \/data\/test -------------------------\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\r\n\u5bfc\u5165\uff1asvn import \/data\/oldboy\/ svn:\/\/10.0.0.6\/sadoc -m \"dddddddddddddd\" --------------------------\u8f93\u5165\u7528\u6237\u540d\u548c\u5bc6\u7801\r\n \r\n\u6216\u8005\u7b80\u5199\u4e3a\uff1asvn co svn:\/\/10.0.0.6\/sadoc \/data\/test\r\n svn cm \/data\/oldboy svn:\/\/10.0.0.6\/sadoc\r\n \r\n <\/pre>\n\r\ncheckout\u4e00\u822c\u53ea\u662f\u7b2c\u4e00\u6b21\u4f7f\u7528\u65f6\u7528\uff0c\u4ee5\u540e\u8981\u66f4\u65b0\u81f3\u6700\u65b0\u7248\u672c\u7528update\u5c31\u53ef\u4ee5\u4e86\r\n \r\n\u67e5\u770bsvn\u4e2d\u7684\u6570\u636e\uff1a\r\n1.Windows\u4e2d\u56fe\u5f62\u754c\u9762\u53ef\u4ee5\u76f4\u63a5\u67e5\u770b\r\n2.Linux\u4e2d\uff1asvn ls svn:\/\/10.0.0.6\/sadoc (ls ---> list)(\u53ea\u80fd\u67e5\u770b\u4e00\u7ea7\u76ee\u5f55\uff09\r\n \r\n\r\n \r\n \r\n\u94a9\u5b50\uff1ahooks\r\n \u5f53\u7248\u672c\u66f4\u65b0\u65f6\uff0c\u94a9\u5b50\u7a0b\u5e8f\u53ef\u4ee5\u88ab\u89e6\u53d1\uff0c\u6bd4\u5982\u53d1\u4e2a\u90ae\u4ef6\uff0c\u7b49\u6216\u8005\u5176\u4ed6\u64cd\u4f5c\uff0c\u662f\u4e00\u4e2a\u53ef\u4ee5\u88ab\u89e6\u53d1\u7684\u4e8b\u4ef6\u548c\u7a0b\u5e8f\r\n \r\n <\/pre>\n \r\n1.post-commit\r\npost-commit\uff1a\u5728\u63d0\u4ea4\u5b8c\u6210\uff0c\u6210\u529f\u521b\u5efa\u7248\u672c\u4e4b\u540e\uff0c\u6267\u884c\u8be5\u94a9\u5b50\u7a0b\u5e8f\uff0c\u63d0\u4ea4\u5df2\u7ecf\u5b8c\u6210\uff0c\u4e0d\u53ef\u66f4\u6539\uff0c\u56e0\u6b64\u672c\u811a\u672c\u7684\u8fd4\u56de\u503c\u88ab\u5ffd\u60a0\r\n\u4f8b\uff1acp post-commit.tmpl post-commit\r\n vim post-commit\r\n \u5c06\u672b\u884c\u6ce8\u91ca\u6389\uff0c\u6dfb\u52a0\uff1a\r\n touch \/tmp\/$(date +%M%S).log\r\n chmod 755 post-commit\r\n <\/pre>\n\r\n2.pre-commit \u4f1a\u5728\u4f60\u63d0\u4ea4\u65f6\u505a\u4e00\u4e9b\u9650\u5236\uff0c\u7b26\u5408\u8be5\u811a\u672c\u5185\u5bb9\u7684\u624d\u53ef\u4ee5\u88ab\u63d0\u4ea4\u4e0a\u6765\u3002\u4e0d\u7b26\u5408\u7684\u4f1a\u62a5\u9519\r\n \r\n\u94a9\u5b50\u5728\u751f\u6210\u73af\u5883\u4e2d\u7684\u5e94\u7528\uff1a\r\n \uff081\uff09\u9650\u5236\u4e0a\u4f20\u7684\u6587\u4ef6\u6269\u5c55\u540d\u548c\u5927\u5c0f\r\n \uff082\uff09svn\u66f4\u65b0\u65f6\u81ea\u52a8\u544a\u77e5\uff0cMSN\u6216\u8005\u90ae\u4ef6\u6216\u77ed\u4fe1\u7b49\r\n \uff083\uff09svn\u66f4\u65b0\u65f6\u89e6\u53d1rsync\u63a8\u9001\uff0c\u8fdb\u884c\u663e\u793a\u7248\u672c\u7684\u540c\u65f6\u66f4\u65b0\r\n <\/pre>\n ....................................................................................................................................................<\/p>\n
Linux\u4e0a\u90e8\u7f724\u4e2a\u9879\u76ee\u7684svn\u64cd\u4f5c\u6b65\u9aa4\uff1a<\/p>\n
\r\n[root@localhost ~]# yum -y install subversion\r\n[root@localhost ~]# svnserve --version\r\nsvnserve, version 1.6.11 (r934486)\r\n ......\r\n[root@localhost ~]# mkdir -p \/a\/svn\/\r\n[root@localhost ~]# mkdir \/a\/passwd\r\n[root@localhost ~]# svnserve -d -r \/a\/svn\r\n[root@localhost ~]# svnadmin create \/a\/svn\/repo1\r\n[root@localhost ~]# svnadmin create \/a\/svn\/repo2\r\n[root@localhost ~]# svnadmin create \/a\/svn\/repo3\r\n[root@localhost ~]# svnadmin create \/a\/svn\/repo4\r\n[root@localhost ~]# cp \/a\/svn\/repo1\/conf\/passwd \/a\/passwd\/\r\n[root@localhost ~]# cp \/a\/svn\/repo1\/conf\/authz \/a\/passwd\/\r\n[root@localhost ~]# vim \/a\/svn\/repo1\/conf\/svnserve.conf \r\n[general]\r\nanon-access=none\r\nauth-access=write\r\npassword-db = \/a\/passwd\/passwd\r\nauthz-db = \/a\/passwd\/authz\r\nrealm=1111111111111111111111111111111111111\r\n[root@localhost ~]# mv \/a\/svn\/repo2\/conf\/svnserve.conf \/a\/svn\/repo2\/conf\/svnserve.conf.bak \r\n[root@localhost ~]# mv \/a\/svn\/repo3\/conf\/svnserve.conf \/a\/svn\/repo3\/conf\/svnserve.conf.bak \r\n[root@localhost ~]# mv \/a\/svn\/repo4\/conf\/svnserve.conf \/a\/svn\/repo4\/conf\/svnserve.conf.bak \r\n[root@localhost ~]# cp \/a\/svn\/repo1\/conf\/svnserve.conf \/a\/svn\/repo2\/conf\/svnserve.conf\r\n[root@localhost ~]# cp \/a\/svn\/repo1\/conf\/svnserve.conf \/a\/svn\/repo3\/conf\/svnserve.conf\r\n[root@localhost ~]# cp \/a\/svn\/repo1\/conf\/svnserve.conf \/a\/svn\/repo4\/conf\/svnserve.conf\r\n[root@localhost ~]# vim \/a\/passwd\/passwd\r\n[users]\r\nchen=chen123\r\nlu=lu123\r\nzhang=zhang123\r\nwang=wang123\r\nhua=hua123\r\ndong=dong123\r\n[root@localhost ~]# vim \/a\/passwd\/authz \r\n[groups]\r\njava=chen,lu,zhang\r\nios=wang\r\nweb=hua\r\njishu=dong\r\n[repo1:\/]\r\n@java=rw\r\n[repo2:\/]\r\n@ios=rw\r\n[repo3:\/]\r\n@web=rw\r\n[repo4:\/]\r\n@jishu=rw\r\n[root@localhost conf]# chmod 700 \/a\/passwd\/* \r\n[root@localhost ~]# pkill svnserve\r\n[root@localhost ~]# ps -ef |grep svn\r\nroot 2405 2106 0 18:59 pts\/1 00:00:00 grep svn\r\n[root@localhost ~]# svnserve -d -r \/a\/svn\/\r\n[root@localhost ~]# ps -ef |grep svn\r\nroot 2411 1 0 19:00 ? 00:00:00 svnserve -d -r \/a\/svn\/\r\nroot 2413 2106 0 19:00 pts\/1 00:00:00 grep svn\r\n[root@localhost ~]# \r\n<\/pre>\n\n\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/www.cnblogs.com\/kaishirenshi\/p\/7677630.html<\/a><\/p>\n\u672c\u6587\u5730\u5740\uff1ahttps:\/\/lrxjmw.cn\/linux-bulid-svn.html<\/a>\u7f16\u8f91\uff1a\u51af\u745e\u6d9b\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"\u5bfc\u8bfb SVN\u662fSubversion\u7684\u7b80\u79f0\uff0c\u662f\u4e00\u4e2a\u5f00\u653e\u6e90\u4ee3\u7801\u7684\u7248\u672c\u63a7\u5236\u7cfb\u7edf\uff0c\u76f8\u8f83\u4e8eRCS\u3001CVS\uff0c\u5b83\u91c7\u7528\u4e86\u5206\u652f\u7ba1 […]<\/p>\n","protected":false},"author":1329,"featured_media":106961,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-105062","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/105062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1329"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=105062"}],"version-history":[{"count":10,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/105062\/revisions"}],"predecessor-version":[{"id":293570,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/105062\/revisions\/293570"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/106961"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=105062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=105062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=105062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}