Osmosis installation is usually quite straightforward and lightweight. Osmosis is only a small command line tool after all, however it does require java on your system. This page gives instructions for installing osmosis on different operating systems as well as general information on #environment variables and config files
wget http://bretth.dev.openstreetmap.org/osmosis-build/osmosis-latest.tgz mkdir osmosis mv osmosis-latest.tgz osmosis cd osmosis tar xvfz osmosis-latest.tgz rm osmosis-latest.tgz chmod a+x bin/osmosis bin/osmosis
cd ~/src git clone git://github.com/openstreetmap/osmosis.git cd osmosis ./gradlew assemble
Osmosis does not build with 'ant' anymore. Please see the readme file for usage with gradlew.
The compiled package can then be run:
For up-to-date instructions, see the readme file.
Osmosis is in debian since the Squeeze release, actually in 0.34 version. If you use debian stable, testing or sid you can install osmosis as simple as:
apt-get install osmosis
Rodolphe Quiédeville maintains an unofficial backport of osmosis for Debian stable that you can reach on http://rodolphe.quiedeville.org/debian/ Add the following line is your sources.list file to use it :
deb http://rodolphe.quiedeville.org/debian/ squeeze-backports main
Running osmosis on Mac OS X 10.5 requires switching the Java framework to 1.6 (from the 1.5 default) by setting the shell variable JAVACMD before executing osmosis. This works on 2007 MacBook Pro Dual Core 2.44MHz and later.
export JAVACMD="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java -Xmx128m"
Alternative: Installation instructions for OS X 10.5 are same as above, except with the caveat that Java 1.6 is currently only supported on 64-bit Intel machines. You could try SoyLatte instead.
Package manager homebrew has a 'recipe' for osmosis. To install the latest stable version, do
brew install osmosis
Things may well run OK without changing the defaults, but you can configure JVM Options and other osmosis defaults by setting environment variables which are picked up by the bin/osmosis script (tacked on to the java command which is invoked there)
To set an environment variable in the scope of your current terminal, just do a command such as:
(This example will bump up the amount of available memory for Java up to 2GB. See Osmosis/Tuning for details)
But if you want to save this so that it happens every time you run osmosis, put the command in a config file. The start-up script looks for a config file at a couple of different possible locations:
Fo example if you want to set the memory and the temporary file use you may enter this line into the config file:
export JAVACMD_OPTIONS="-Xmx2G -Djava.io.tmpdir=/mnt/database/tmp/"