User Tools

Site Tools


en:developer:install_svn
This version is outdated by a newer approved version.DiffThis version (2017/07/25 04:14) is a draft.
Approvals: 0/1

This is an old revision of the document!


SVN Installation

Windows

Mac

Linux

This covers installing subversion from a source tarball, for client-type uses. This document is based on an install of Subversion-1.4.3.tar.gz, but the install procedure should be similar for other versions as well. This does NOT cover installing Subversion as a server - some other steps are required for that. And it does not cover the procedure for compiling the 'bleeding-edges' version of subversion, which is a little different and more complicated (starting with the fact that you need subversion already installed in order to do it…?)

Required Software

For its functionality, subversion makes use of (depends on) a number or other pieces of software, all of which are also available for free. You must install these pieces of software before installing subversion. In many cases, some or all of the required software will already be installed on your system.

At the least, you will need to make sure these are installed correctly:

APR and APR-Util

These are the Apache Portable Runtime (APR) and its utility (APR-Util). Both must be version 0.9.7 or better. These provide a set of APIs that map to the OS - a layer between subversion and the OS which helps makes subversion platform independent. If you already have Apache2 installed then you already have the APR and APR-Util installed as well, so all you need to do is find them (more on that in Install APR and APR-Util)

zlib

zlib is a library with a number of compression and decompression functions, used by Subversion internally. This is usually installed so feel free to start the installation without checking, just remember that if the installation fails, it might be because zlib is not installed.

Neon

You will need neon installed in order to access the Greenstone repository over the internet, via WebDAV. Neon ensures that the subversion client program can handle repositories hosted on http, not just those on a local disk. (Also, if you are going to be hosting repositories over http, you will need neon so you can test those repositories.)

A note on dependencies

Subversion offers a dependencies tarball, containing APR, APR-Util, Neon and zlib. Instructions on using this are in the INSTALL file in the root directory of the subversion tarball. However, if you are installing on a system which already has some of this software installed, a subversion installation which tries to install new copies of them might not go smoothly. For that reason, I recommend checking what you have and don't have installed on your system first, and installing what's missing yourself, before installing subversion.

Depending on the features of subversion that you wish to use, other software might be required for your installation. For example, if you want repository files stored in a BDB database rather than on disk, then BDB will need to be installed prior to installing subversion. For a first install, I recommend installing only the software listed above, as this is all that is required to get a good working subversion with all the main features. Advanced users can read the INSTALL file in the source tarball's root directory for more information on advanced features.

Installation

First install subversions dependency software, then install subversion itself. I prefer to store source code for a given piece of software in /research/oranfry/sources/<software-name-X.X.X> (where X.X.X is the version number) and install binaries to /research/oranfry/<software-name>. These install instructions reflect this preference, to please adjust them for your own preferences.

Install APR and APR-Util

If you have Apache2 If you have Apache2 installed, you don't need to install APR and APR-Util. They are both bundled with Apache2, so will already be installed on your system when it comes time to install subversion.

All you need to do for this step if you have Apache2 is to locate the apr-1-config and apu-1-config programs. They should be in the HTTPD_HOME/bin directory, and may be named slightly differently. For example, they might simply be named apr-config and apu-config. Remember the location of these programs for use in the last step, Install Subversion Itself

If you don't have Apache2 If you don't have Apache2, you will need to install APR and APR-Util. Download a recent version of each as .tar.gz tarballs from http://apr.apache.org/download.cgi, then do the usual ./configure, make, make install. These commands need to be adjusted for the particular version you have downloaded.

#make a directory for my source code to go in
mkdir /research/oranfry/sources

#install apr
cd /research/oranfry/sources
tar -xzf /path/to/apr-X.X.X.tar.gz
cd apr-X.X.X
./configure --prefix=/research/oranfry/apr
make
make install

#install apr-util
cd ..
tar -xzf /path/to/apr-util-X.X.X.tar.gz
cd apr-util-X.X.X
./configure --prefix=/research/oranfry/apu --with-apr=/research/oranfry/apr
make
make install

When compiling apr, if you encounter the error

rm: cannot remove `libtoolT': No such file or directory

then follow the instructions at https://stackoverflow.com/questions/18091991/error-while-compiling-apache-apr-make-file-not-found copied below

Edit your configure file

Change the line

    $RM "$cfgfile"

to

    $RM -f "$cfgfile"

This will resolve the error

    rm: cannot remove `libtoolT': No such file or directory

Then try run configure. That's it :)

Now locate the apr-1-config and apu-1-config programs. In my case they are were at /research/oranfry/apr/bin/apr-1-config and /research/oranfry/apu/bin/apu-1-config. The program binary files may be named slightly differently, for example, they could simply be named apr-config and apu-config. Remember the location of these programs for use in the last step, Install Subversion Itself.

Install zlib

This fairly standard-issue, so is probably installed on your system already. If you really want to check, you could try to compile a C program with #include<zlib.h> as the first line. If it compiles without error, zlib is installed. If not, installation instructions can be found at the zlib website.

Install Neon

Check if you have neon by running:

which neon-config

If you have neon, a path to neon-config will be outputted. Everything before /bin/neon/config is your neon home directory.

The neon version needs to be 0.25.x or greater. Check the neon version with:

neon-config --version

If you have a suitable version of neon, make a note of the neon home directory for use in the last step, Install Subversion Itself.

If you don't have neon, or need to install a newer version, get a recent copy it from the WebDAV website in a .tar.gz archive. Install it with:

cd /research/oranfry/sources
tar -xvf /path/to/neon-X.X.X.tar.gz (See note below)
cd neon-X.X.X
./configure --prefix=/research/oranfry/neon
make
make install

Note: if tar -xvzf doesn't work, try tar -xvf, since the neon.tar.gz file may not be gzipped.

Remember the neon home directory. In my case it is /research/oranfry/neon. This is used in the last step, Install Subversion Itself.

Install Subversion itself

Once all the required software is installed, subversion itself can finally be installed!

Download the most recent release of subversion (1.4.3 at the time of writing) from the Subversion website in .tar.gz format.

The basic installation sequence is below. Now is the time to make use of the paths to apr, apr-util and neon which you have noted down. Replace all paths with those for your own system. You may not need the –disable-neon-version-check switch - only use it if you have a very recent version of neon which svn mightn't know about yet.

cd /research/oranfry/sources
tar -xzf /path/to/subversion-X.X.X.tar.gz
cd subversion-X.X.X
./configure --prefix=/research/oranfry/subversion --without-apxs --with-apr=/research/oranfry/apr/bin/apr-1-config --with-apr-util=/research/oranfry/apu/bin/apu-1-config --disable-neon-version-check --with-neon=/research/oranfry/neon
make
make install

The configure may fail and require you to have sqlite3.c. The fail message will instruct you to grab the latest sqlite3 amalgamation tar.

For older versions of subversion, it will provide a link to the following version: http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz, decompress it and copy the sqlite3.c into a special new subdirectory of your subversion-X.X.X folder.

mkdir /full/path/to/subversion-X.X.X/sqlite-amalgamation
cp sqlite-3.6.13/sqlite3.c /full/path/to/subversion-X.X.X/sqlite-amalgamation/sqlite3.c

After following these instructions in the fail message, re-run the configure step and then proceed to make and make install.

For subversion 1.8.18, follow the instructions that the configure error message provides:

get the sqlite 3.7.15.1 amalgamation from:
    http://www.sqlite.org/sqlite-amalgamation-3071501.zip
unpack the archive using unzip and rename the resulting
directory to:
/Scratch/ak19/sources/subversion-1.8.18/sqlite-amalgamation

Then re-run the configure command and onwards.

Now, subversion is installed in /research/oranfry/subversion. To use the svn command, put /research/oranfry/subversion/bin into your path.

Installing Perl: compiling perl from source

The instructions are from https://perlmaven.com/how-to-build-perl-from-source-code Get the perl you want from http://www.cpan.org/src/, since the wget command didn't work for me. Then untar and follow along, substituting your perl version and a custom location that is not in the system area (like /usr or /opt):

tar -xzf perl-5.20.1.tar.gz
cd perl-5.20.1
./Configure -des -Dprefix=/path/to/non-system/location/where/you/want/your/installed/perl
make
make test
make install

Once it's finished compiling, your perl is ready for use. To do so: make sure to always first set up your PATH to point to your new perl's bin subfolder in any terminal which should use your locally installed perl rather than the system perl:

export PATH=/path/to/your/custom/compiled-and-installed/perl/bin:$PATH

Since you wouldn't have installed perl in a system location, uninstalling can be as simple as just removing the installed folder.

en/developer/install_svn.1500956086.txt.gz · Last modified: 2017/07/25 04:14 by anupama