Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Steps I've taken to make my laptop a Subversion server. Credit must go to <a href="http://alephzarro.com/blog/" rel="noreferrer">AlephZarro</a> for his directions <a href="http://alephzarro.com/blog/2007/01/07/installation-of-subversion-on-ubuntu-with-apache-ssl-and-basicauth/" rel="noreferrer">here</a>. I now have a working SVN server (which has currently only been tested locally).</p> <p>Specific setup: Kubuntu 8.04 Hardy Heron</p> <p>Requirements to follow this guide:</p> <ul> <li>apt-get package manager program</li> <li>text editor (I use kate)</li> <li>sudo access rights</li> </ul> <p>1: Install Apache HTTP server and required modules:</p> <pre><code>sudo apt-get install libapache2-svn apache2 </code></pre> <p>The following extra packages will be installed:</p> <pre><code>apache2-mpm-worker apache2-utils apache2.2-common </code></pre> <p>2: Enable SSL</p> <pre><code>sudo a2enmod ssl sudo kate /etc/apache2/ports.conf </code></pre> <p>Add or check that the following is in the file:</p> <pre><code>&lt;IfModule mod_ssl.c&gt; Listen 443 &lt;/IfModule&gt; </code></pre> <p>3: Generate an SSL certificate:</p> <pre><code>sudo apt-get install ssl-cert sudo mkdir /etc/apache2/ssl sudo /usr/sbin/make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem </code></pre> <p>4: Create virtual host</p> <pre><code>sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/svnserver sudo kate /etc/apache2/sites-available/svnserver </code></pre> <p>Change (in ports.conf):</p> <pre><code>"NameVirtualHost *" to "NameVirtualHost *:443" </code></pre> <p>and (in svnserver)</p> <pre><code>&lt;VirtualHost *&gt; to &lt;VirtualHost *:443&gt; </code></pre> <p>Add, under ServerAdmin (also in file svnserver):</p> <pre><code>SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.pem SSLProtocol all SSLCipherSuite HIGH:MEDIUM </code></pre> <p>5: Enable the site:</p> <pre><code>sudo a2ensite svnserver sudo /etc/init.d/apache2 restart </code></pre> <p>To overcome warnings:</p> <pre><code>sudo kate /etc/apache2/apache2.conf </code></pre> <p>Add:</p> <pre><code>"ServerName $your_server_name" </code></pre> <p>6: Adding repository(ies): The following setup assumes we want to host multiple repositories. Run this for creating the first repository:</p> <pre><code>sudo mkdir /var/svn REPOS=myFirstRepo sudo svnadmin create /var/svn/$REPOS sudo chown -R www-data:www-data /var/svn/$REPOS sudo chmod -R g+ws /var/svn/$REPOS </code></pre> <p>6.a. For more repositories: do step 6 again (changing the value of REPOS), skipping the step <code>mkdir /var/svn</code></p> <p>7: Add an authenticated user</p> <pre><code>sudo htpasswd -c -m /etc/apache2/dav_svn.passwd $user_name </code></pre> <p>8: Enable and configure WebDAV and SVN:</p> <pre><code>sudo kate /etc/apache2/mods-available/dav_svn.conf </code></pre> <p>Add or uncomment:</p> <pre><code>&lt;Location /svn&gt; DAV svn # for multiple repositories - see comments in file SVNParentPath /var/svn AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user SSLRequireSSL &lt;/Location&gt; </code></pre> <p>9: Restart apache server:</p> <pre><code>sudo /etc/init.d/apache2 restart </code></pre> <p>10: Validation:</p> <p>Fired up a browser:</p> <pre><code>http://localhost/svn/$REPOS https://localhost/svn/$REPOS </code></pre> <p>Both required a username and password. I think uncommenting:</p> <pre><code>&lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt; &lt;/LimitExcept&gt; </code></pre> <p>in <code>/etc/apache2/mods-available/dav_svn.conf</code>, would allow anonymous browsing. </p> <p>The browser shows "Revision 0: /"</p> <p>Commit something:</p> <pre><code>svn import --username $user_name anyfile.txt https://localhost/svn/$REPOS/anyfile.txt -m “Testing” </code></pre> <p>Accept the certificate and enter password. Check out what you've just committed:</p> <pre><code>svn co --username $user_name https://localhost/svn/$REPOS </code></pre> <p>Following these steps (assuming I haven't made any error copy/pasting), I had a working SVN repository on my laptop.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload