Extracting the tar ball
tar xvfz MobilityDB-1.0.tar.gz cd MobilityDB-1.0
To compile assuming you have all the dependencies in your search path
mkdir build cd build cmake .. make sudo make install
Once MobilityDB is installed, it needs to be enabled in each individual database you want to use it in. In this example, PostGIS 2.5.5 is been used:
createdb mobility psql mobility -c "CREATE EXTENSION PostGIS WITH VERSION '2.5.5'" psql mobility -c 'CREATE EXTENSION MobilityDB'
The MobilityDB latest release can be found in https://github.com/MobilityDB/MobilityDB/releases/latest
wget
To download this release:
wget -O mobilitydb-1.0.tar.gz https://github.com/MobilityDB/MobilityDB/archive/v1.0.tar.gz
Go to Section 1.5.1 to the extract and compile instructions.
git
To download the repository
git clone https://github.com/MobilityDB/MobilityDB.git cd MobilityDB git checkout v1.0
Go to Section 1.5.1 to the compile instructions (there is no tar ball).
MobilityDB is an extension that depends on PostGIS. Enabling PostGIS before enabling MobilityDB in the database can be done as follows
CREATE EXTENSION postgis; CREATE EXTENSION mobilitydb;
Alternatively, this can be done in a single command by using CASCADE
, which installs the required PostGIS extension before installing the MobilityDB extension
CREATE EXTENSION mobilitydb CASCADE;
Compilation Dependencies
To be able to compile MobilityDB, make sure that the following dependencies are met:
GNU C compiler (gcc
). Some other ANSI C compilers can be used but may cause problems compiling some dependencies such as PostGIS.
GNU Make (gmake
or make
) version 3.1 or higher. For many systems, GNU make is the default version of make. Check the version by invoking make -v
.
PostgreSQL version 10 or higher. PostgreSQL is available from http://www.postgresql.org. Notice that for using SP-GiST indexes for MobilityDB you need at least PostgreSQL version 11.
PostGIS version 2.5. PostGIS is available from https://postgis.net/. PostGIS version 3.0 or higher is currently not supported, this is planned for future releases of MobilityDB.
GNU Scientific Library (GSL). GSL is available from https://www.gnu.org/software/gsl/. GSL is used for the random number generators.
Please notice that PostGIS has its own dependencies such as Proj4, GEOS, LibXML2, or JSON-C, and these libraries are also used in MobilityDB. For a full PostgreSQL/PostGIS support matrix and PostGIS/GEOS support matrix refer to http://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS.
Optional Dependencies
For the user's documentation
The DocBook DTD and XSL files are required for building the documentation. For Ubuntu, they are provided by the packages docbook
and docbook-xsl
.
The XML validator xmllint
is required for validating the XML files of the documentation. For Ubuntu, it is provided by the package libxml2
.
The XSLT processor xsltproc
is required for building the documentation in HTML format. For Ubuntu, it is provided by the package libxslt
.
The program dblatex
is required for building the documentation in PDF format. For Ubuntu, it is provided by the package dblatex
.
The program dbtoepub
is required for building the documentation in EPUB format. For Ubuntu, it is provided by the package dbtoepub
.
For the developers's documentation
The program doxygen
is required for building the documentation. For Ubuntu, it is provided by the package doxygen
.
Example: Installing dependencies on Linux
Database dependencies
sudo apt-get install postgresql-13 postgresql-server-dev-13 postgresql-13-postgis
Build dependencies
sudo apt-get install cmake gcc libgsl-dev
MobilityDB uses the cmake
system to do the configuration. The build directory must be different from the source directory.
To create the build directory
mkdir build
To see the variables that can be configured
cd build cmake -L ..
Please notice that the current version of MobilityDB has only been tested on Linux systems. It may work on other UNIX-like systems, but remain untested. Support for Windows is planned. We are looking for volunteers to help us to test MobilityDB on multiple platforms.
The following instructions start from path/to/MobilityDB
on a Linux system
mkdir build cd build cmake .. make sudo make install
When the configuration changes
rm -rf build
and start the build process as mentioned above.
MobilityDB uses ctest
, the CMake test driver program, for testing. This program will run the tests and report results.
To run all the tests
ctest
To run a given test file
ctest -R '21_tbox'
To run a set of given test files you can use wildcards
ctest -R '22_*'
MobilityDB user's documentation can be generated in HTML, PDF, and EPUB format. Furthermore, the documentation is available in English and in other languages (currently, only in Spanish). The user's documentation can be generated in all formats and in all languages, or specific formats and/or languages can be specified. MobilityDB developer's documentation can only be generated in HTML format and in English.
The variables used for generating user's and the developer's documentation are as follows:
Variable | Default value | Comment |
---|---|---|
DOC_ALL | BOOL=OFF | The user's documentation is generated in HTML, PDF, and EPUB formats. |
DOC_HTML | BOOL=OFF | The user's documentation is generated in HTML format. |
DOC_PDF | BOOL=OFF | The user's documentation is generated in PDF format. |
DOC_EPUB | BOOL=OFF | The user's documentation is generated in EPUB format. |
LANG_ALL | BOOL=OFF | The user's documentation is generated in English and in all available translations. |
ES | BOOL=OFF | The user's documentation is generated in English and in Spanish. |
DOC_DEV | BOOL=OFF | The English developer's documentation is generated in HTML format. |
Table 1.1. Variables for the user's and the developer's documentation
Generate the user's and the developer's documentation in all formats and in all languages.
cmake -D DOC_ALL=ON -D LANG_ALL=ON -D DOC_DEV=ON .. make doc make doc_dev
Generate the user's documentation in HTML format and in all languages.
cmake -D DOC_HTML=ON -D LANG_ALL=ON .. make doc
Generate the English user's documentation in all formats.
cmake -D DOC_ALL=ON .. make doc
Generate the user's documentation in PDF format in English and in Spanish.
cmake -D DOC_PDF=ON -D ES=ON .. make doc