{"id":220,"date":"2013-03-01T22:43:29","date_gmt":"2013-03-01T21:43:29","guid":{"rendered":"http:\/\/blog.rabahi.net\/?page_id=220"},"modified":"2014-08-24T16:39:44","modified_gmt":"2014-08-24T14:39:44","slug":"subversion","status":"publish","type":"page","link":"https:\/\/blog.rabahi.net\/?page_id=220","title":{"rendered":"Subversion"},"content":{"rendered":"<h1>Prerequiste<\/h1>\n<p>I assume that you have a Centos installation.<\/p>\n<h1>Installation<\/h1>\n<p>You can copy\/paste this script and use it to configure automatically your server.<br \/>\nIf wget failed, you can download svnindex files from <a href=\"wp-content\/uploads\/2013\/03\/svnindex.tgz\">here<\/a><\/p>\n<pre class=\"bash\" style=\"font-family:monospace;\"><ol><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #666666; font-style: italic;\">#!\/bin\/bash<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;install tools subversion, mod_dav_svn&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">dnf <span style=\"color: #660033;\">-y<\/span> <span style=\"color: #c20cb9; font-weight: bold;\">install<\/span> subversion mod_dav_svn<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;create trees in \/opt\/svn&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">mkdir<\/span> <span style=\"color: #660033;\">-p<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>repos<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">mkdir<\/span> <span style=\"color: #660033;\">-p<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>bin<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">mkdir<\/span> <span style=\"color: #660033;\">-p<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>conf<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;create sample of svn access file (\/opt\/svn\/conf\/dav_svn.authz)&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">cat<\/span> <span style=\"color: #000000; font-weight: bold;\">&gt;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>conf<span style=\"color: #000000; font-weight: bold;\">\/<\/span>dav_svn.authz <span style=\"color: #000000; font-weight: bold;\">&lt;&lt;<\/span> <span style=\"color: #ff0000;\">&quot;EOF&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">[<\/span><span style=\"color: #c20cb9; font-weight: bold;\">groups<\/span><span style=\"color: #7a0874; font-weight: bold;\">]<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">staff = joe, george<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">[<\/span><span style=\"color: #000000; font-weight: bold;\">\/<\/span><span style=\"color: #7a0874; font-weight: bold;\">]<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #000000; font-weight: bold;\">*<\/span> = rw<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">[<\/span>framework:<span style=\"color: #000000; font-weight: bold;\">\/<\/span><span style=\"color: #7a0874; font-weight: bold;\">]<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">john =  r<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #000000; font-weight: bold;\">@<\/span>staff = rw<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">EOF<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;configure httpd (create \/etc\/httpd\/conf.d\/svn.conf)&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">cat<\/span> <span style=\"color: #000000; font-weight: bold;\">&gt;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>etc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>httpd<span style=\"color: #000000; font-weight: bold;\">\/<\/span>conf.d<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn.conf <span style=\"color: #000000; font-weight: bold;\">&lt;&lt;<\/span> <span style=\"color: #ff0000;\">&quot;EOF&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">LoadModule dav_svn_module     modules<span style=\"color: #000000; font-weight: bold;\">\/<\/span>mod_dav_svn.so<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">LoadModule authz_svn_module   modules<span style=\"color: #000000; font-weight: bold;\">\/<\/span>mod_authz_svn.so<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #000000; font-weight: bold;\">&lt;<\/span>Location <span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/&gt;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">   <span style=\"color: #666666; font-style: italic;\"># Load subversion mod<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">   DAV <span style=\"color: #c20cb9; font-weight: bold;\">svn<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">   <span style=\"color: #666666; font-style: italic;\"># Subversion configuration<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">   SVNParentPath <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>repos<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">   SVNListParentPath On<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">   SVNIndexXSLT <span style=\"color: #ff0000;\">&quot;\/svnindex.xsl&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">   Options Indexes MultiViews IncludesNoExec<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">   AuthzSVNAccessFile <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>conf<span style=\"color: #000000; font-weight: bold;\">\/<\/span>dav_svn.authz<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">   AuthType Basic<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">   AuthName <span style=\"color: #ff0000;\">&quot;Subversion repos&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">    <span style=\"color: #666666; font-style: italic;\">#Require valid-user<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">   Require all granted<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #000000; font-weight: bold;\">&lt;\/<\/span>Location<span style=\"color: #000000; font-weight: bold;\">&gt;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">EOF<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;get svnindex file from here: http:\/\/code.google.com\/p\/tortoisesvn\/source\/browse\/trunk\/contrib\/svnindex\/&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">cp<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>usr<span style=\"color: #000000; font-weight: bold;\">\/<\/span>share<span style=\"color: #000000; font-weight: bold;\">\/<\/span>doc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>subversion-1.7.14<span style=\"color: #000000; font-weight: bold;\">\/<\/span>xslt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svnindex.xsl <span style=\"color: #000000; font-weight: bold;\">\/<\/span>var<span style=\"color: #000000; font-weight: bold;\">\/<\/span>www<span style=\"color: #000000; font-weight: bold;\">\/<\/span>html<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">cp<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>usr<span style=\"color: #000000; font-weight: bold;\">\/<\/span>share<span style=\"color: #000000; font-weight: bold;\">\/<\/span>doc<span style=\"color: #000000; font-weight: bold;\">\/<\/span>subversion-1.7.14<span style=\"color: #000000; font-weight: bold;\">\/<\/span>xslt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svnindex.css <span style=\"color: #000000; font-weight: bold;\">\/<\/span>var<span style=\"color: #000000; font-weight: bold;\">\/<\/span>www<span style=\"color: #000000; font-weight: bold;\">\/<\/span>html<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">chown<\/span> apache:apache <span style=\"color: #000000; font-weight: bold;\">\/<\/span>var<span style=\"color: #000000; font-weight: bold;\">\/<\/span>www<span style=\"color: #000000; font-weight: bold;\">\/<\/span>html<span style=\"color: #000000; font-weight: bold;\">\/<\/span> <span style=\"color: #660033;\">-R<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;create \/opt\/svn\/bin\/create.sh&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">cat<\/span> <span style=\"color: #000000; font-weight: bold;\">&gt;<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>bin<span style=\"color: #000000; font-weight: bold;\">\/<\/span>create.sh <span style=\"color: #000000; font-weight: bold;\">&lt;&lt;<\/span> <span style=\"color: #ff0000;\">&quot;EOF&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">svnadmin create<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>repos<span style=\"color: #000000; font-weight: bold;\">\/<\/span><span style=\"color: #007800;\">$1<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">chown<\/span> <span style=\"color: #660033;\">-R<\/span> apache:apache <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>repos<span style=\"color: #000000; font-weight: bold;\">\/<\/span><span style=\"color: #007800;\">$1<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">chmod<\/span> <span style=\"color: #660033;\">-R<\/span> <span style=\"color: #000000;\">750<\/span> <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>repos<span style=\"color: #000000; font-weight: bold;\">\/<\/span><span style=\"color: #007800;\">$1<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">EOF<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">chmod<\/span> a+x <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>bin<span style=\"color: #000000; font-weight: bold;\">\/<\/span>create.sh<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;create a sample repository named 'myrepos'&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span>bin<span style=\"color: #000000; font-weight: bold;\">\/<\/span>create.sh myrepos<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;set authz on \/opt\/svn&quot;<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #c20cb9; font-weight: bold;\">chown<\/span> apache:apache <span style=\"color: #000000; font-weight: bold;\">\/<\/span>opt<span style=\"color: #000000; font-weight: bold;\">\/<\/span>svn<span style=\"color: #000000; font-weight: bold;\">\/<\/span> <span style=\"color: #660033;\">-R<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;Now restart httpd&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">systemctl restart httpd.service<\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\"><span style=\"color: #007800;\">myip<\/span>=<span style=\"color: #000000; font-weight: bold;\">`<\/span><span style=\"color: #c20cb9; font-weight: bold;\">hostname<\/span> -I<span style=\"color: #000000; font-weight: bold;\">`<\/span><\/div><\/li><li style=\"background: #f0f0f0;\"><div style=\"font-size: 12px;\"><span style=\"color: #7a0874; font-weight: bold;\">echo<\/span> <span style=\"color: #ff0000;\">&quot;Now meet you there: http:\/\/<span style=\"color: #007800;\">$myip<\/span>\/svn\/&quot;<\/span><\/div><\/li><li style=\"background: #fcfcfc;\"><div style=\"font-size: 12px;\">&nbsp;<\/div><\/li><\/ol><\/pre>\n<p>That&#8217;s all \ud83d\ude42<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.rabahi.net\/wp-content\/uploads\/2013\/03\/Administration-\u2013-svn.png\" alt=\"Administration \u2013 svn\" width=\"1170\" height=\"133\" class=\"alignnone size-full wp-image-349\" \/><\/p>\n<h1>FAQ<\/h1>\n<p>Need some help? Have a look here: <a href=\"http:\/\/blog.rabahi.net\/?page_id=1221\" title=\"Subversion Survival Guide\">Subversion Survival Guide<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prerequiste I assume that you have a Centos installation. Installation You can copy\/paste this script and use it to configure automatically your server. If wget failed, you can download svnindex files from here That&#8217;s all \ud83d\ude42 FAQ Need some help? Have a look here: Subversion Survival Guide<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":233,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-220","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=220"}],"version-history":[{"count":24,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/220\/revisions"}],"predecessor-version":[{"id":1224,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/220\/revisions\/1224"}],"up":[{"embeddable":true,"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=\/wp\/v2\/pages\/233"}],"wp:attachment":[{"href":"https:\/\/blog.rabahi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}