<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Joe Maller &#187; subversion</title>
	<atom:link href="http://joemaller.com/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://joemaller.com</link>
	<description>.com</description>
	<lastBuildDate>Tue, 15 May 2012 03:40:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to install Subversion on a shared host</title>
		<link>http://joemaller.com/881/how-to-install-subversion-on-a-shared-host/</link>
		<comments>http://joemaller.com/881/how-to-install-subversion-on-a-shared-host/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 04:04:43 +0000</pubDate>
		<dc:creator>Joe</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[64 bit]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[liquidweb]]></category>
		<category><![CDATA[shared hosting]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://joemaller.com/2008/01/29/how-to-install-subversion-on-a-shared-host/</guid>
		<description><![CDATA[I&#8217;ve hosted this site and several others LiquidWeb&#8217;s shared servers for probably eight years. They are without question, the most dependable host I&#8217;ve ever used. [see update] But LiquidWeb doesn&#8217;t offer Subversion. And I will no longer do web work without it. For some time I&#8217;d been considering leaving LiquidWeb because the lack of svn [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve hosted this site and several others <a href="http://www.liquidweb.com/">LiquidWeb&#8217;s shared servers</a> for probably eight years. They are without question, the most dependable host I&#8217;ve ever used. <em>[<a href="http://joemaller.com/881/how-to-install-subversion-on-a-shared-host/#lwupdate">see update</a>]</em></p>
<p>But LiquidWeb doesn&#8217;t offer <a href="http://subversion.tigris.org/">Subversion</a>. And I will no longer do web work without it.</p>
<p>For some time I&#8217;d been considering leaving LiquidWeb because the lack of svn was now hindering work on my own sites. For the same reason, I&#8217;ve had to pass them over several times when clients asked for hosting recommendations. Then the other night, I stumbled across a discussion about installing Subversion on a shared host. Why didn&#8217;t I  try that years ago? </p>
<p><span id="more-881"></span></p>
<h3>Installation Instructions</h3>
<p>These instructions assume basic proficiency with the Unix command line. Note that the goal is to install the SVN client, plan on hosting your repositories somewhere else.</p>
<p>Connect to  your account with ssh and create a working directory, mine&#8217;s called _src:</p>
<pre><code>cd
mkdir _src
cd _src</code></pre>
<p>Next, use <a href="http://linux.die.net/man/1/wget">wget</a> to pull down the subversion sources. You could also use curl, but wget does the same with less typing. Choose a version from this <a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&#038;expandFolder=74">list of Subversion sources</a>. The parallel &#8220;subversion-deps&#8221; download includes all dependent sources required to build Subversion.</p>
<pre><code>wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.4.6.tar.gz</code></pre>
<p>Next, untar the sources and dive into the directory:</p>
<pre><code>tar -xzvf subversion-1.4.6.tar.gz
tar -xzvf subversion-deps-1.4.6.tar.gz
cd subversion-1.4.6</code></pre>
<h3>One step, maybe (32-bit?)</h3>
<p>At this point, depending on your server configuration, you might be able to install with the following two commands:</p>
<pre><code>./configure --prefix=$HOME --without-berkeley-db \
     --with-ssl --with-editor=/usr/bin/vim \
     --without-apxs --without-apache
make &amp;&amp; make install</code></pre>
<p>That worked on some servers but not others, I spent many hours clumsily trying to figure out why. I found that the build process was linking to external libraries instead of the ones in subversion-deps, despite the configure directives.</p>
<p>On the 64-bit server (x86_64) this was a big problem, even though everything worked normally on two 32-bit (i686/i386) servers.  Check server architecture with either <code>arch</code>, <code>uname -a</code> or <code>cat /proc/cpuinfo</code>. The solution for 64-bit machines is to build the three main components beforehand and then tell Subversion where to find them.</p>
<h3>Build them, use them  (64-bit?)</h3>
<p>The following commands systematically build each of the three shared libraries from the Subversion-deps sources. This should guarantee that the files Subversion links to will be compatible. In each step, we explicitly enable compilation of shared libraries and prefix the files into our home directory. This looks worse than it is.</p>
<p>Build <a href="http://apr.apache.org/">apr</a>, apr-util and <a href="http://www.webdav.org/neon/">neon</a>, in that order:</p>
<pre><code>cd apr
./configure --enable-shared --prefix=$HOME
make &amp;&amp; make install

cd ../apr-util
./configure --enable-shared --prefix=$HOME \
     --with-expat=builtin --with-apr=$HOME \
     --without-berkeley-db
make &amp;&amp; make install

cd ../neon
./configure --enable-shared --prefix=$HOME \
     --with-libs=$HOME --with-ssl
make &amp;&amp; make install</code></pre>
<p>With those out of the way, we can now configure and build Subversion. According to the notes in Subversion&#8217;s configure file, the <code>--with-ssl</code> flag is not necessary since it&#8217;s just passed to neon and we already built neon.  <code>--without-apxs</code> and <code>--without-apache</code> prevent Subversion from trying to install its Apache modules. Remember to point to the libraries we just built (in $HOME): (note: you may need to add the <code>--without-serf</code> flag as well, <a href="#comment-50835">see this comment</a>)</p>
<pre><code>cd ../
./configure --prefix=$HOME --without-berkeley-db \
     --with-editor=/usr/bin/vim --with-apr=$HOME \
     --with-apr-util=$HOME --with-neon=$HOME \
     --without-apxs --without-apache
make &amp;&amp; make install</code></pre>
<p>Subversion should now be installed! It&#8217;s likely you already have <code>:~/bin</code> in your user $PATH, if so, you can try it out right away:</p>
<pre><code>svn --version

   svn, version 1.4.6 (r28521)
      compiled Jan 29 2008, 11:05:47</code></pre>
<p>So far, I&#8217;ve run this against two LiquidWeb shared accounts, one LiquidWeb CPanel container on a VPS and a <a href="http://www.hostmatters.com/">HostingMatters</a> shared account running JailShell. After some limited testing accessing different repositories with https and svn+ssh, everything seems to be working.</p>
<p>Now I just need to figure out where to put my repositories, here are some free Subversion hosts I&#8217;ve used or are considering:</p>
<ul>
<li><a href="http://www.beanstalkapp.com/pricing.html">Beanstalk</a> 20 MB free</li>
<li><a href="http://www.assembla.com">Assembla</a> 500 MB free?! really?</li>
<li><a href='http://unfuddle.com/home'>Unfuddle</a> 15 MB free</li>
<li><a href="http://code.google.com/hosting/">Google Code</a> 100 MB free, must be open source</li>
</ul>
<p>Two other sites which aren&#8217;t free, but I&#8217;m keeping in mind for the future: <a href="http://wush.net/">Wush</a> and  <a href="http://www.projectlocker.com/scenario/startup">Project Locker</a>.</p>
<h3>The getting there was the hardest part</h3>
<p>While I was finally able to streamline this down to a fairly simple process, it was not easy to get there.  I don&#8217;t do much compiling from source, so I&#8217;m very clumsy about troubleshooting. If any of these steps can be simplified, please leave a note.</p>
<pre><code>Here are some of the errors I saw along the way:
/usr/lib/libexpat.so: could not read symbols: File in wrong format
/usr/lib/libexpat.so: could not read symbols: Invalid operation
/home/joe/_src/subversion-1.4.6/neon/src/.libs/libneon.a: could not read symbols: Bad value </code></pre>
<p>The first two errors indicate that the build had grabbed the 32-bit libexpat from /usr/lib instead of the 64-bit version from /usr/lib64. However, redirecting to the 64-bit libraries introduced other problems such as the libneon.a bad value error. As mentioned above, what I needed to do was pull libraries from the subverson-deps code. To use those, I needed to compile each one first. </p>
<h3>Resources:</h3>
<ul>
<li><a href="http://svn.collab.net/repos/svn/trunk/INSTALL">Subversion&#8217;s INSTALL file</a></li>
<li>./configure -help</li>
<li><a href="http://pastie.caboo.se/99618">These commands</a>, from <a href="http://forum.activereload.net/forums/8/topics/241#post_934">this original post</a> almost worked.</li>
<li><a href='http://www.apdz.com/phpbb/viewtopic.php?t=369&#038;;sid=cbd15a9447f96cf9eb5000c4efb1b167'>Installing Mephisto and Subversion on a Shared Host</a>, first inkling this was possible</li>
<li>similar problem with with <a href="http://svn.haxx.se/users/archive-2005-05/0284.shtml">/usr/lib instead of /usr/lib64.</a></li>
<li><a href="http://www.linuxquestions.org/questions/showthread.php?t=563541">GATTAGA&#8217;s post</a> was the first clue about working around the libexpat problem.</li>
<li><a href="http://www.svnforum.org/2017/viewtopic.php?t=1940&#038;;sid=1d48a79776ec72bfbb719b91beb274ba">SVNforum: libneon.a: could not read symbols: Bad value</a> This was the post that gave me the final bit of information I needed</li>
</ul>
<p><strong>Related:</strong> <a href="http://joemaller.com/2008/08/13/how-to-install-git-on-a-shared-host/">How to install Git on a shared host</a></p>
<p><strong id="lwupdate">Update, November 2010:</strong> Sometime this year Liquid Web disallowed compiler access.  I now host my sites at <a href="http://www.webfaction.com/signup?affiliate=joemaller">WebFaction</a> and <a href="http://www.a2hosting.com/1482.html">A2 Hosting</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://joemaller.com/881/how-to-install-subversion-on-a-shared-host/feed/</wfw:commentRss>
		<slash:comments>58</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 1/14 queries in 0.004 seconds using disk: basic
Object Caching 219/244 objects using disk: basic

Served from: joemaller.com @ 2012-05-24 03:00:45 -->
