The following sections describe how to compile and build the ArangoDB from scratch. The ArangoDB will compile on most Linux and Mac OS X systems. It assumes that you use the GNU C++ compiler to compile the source. The ArangoDB has been tested with the GNU C++ compiler, but should compile with any Posix compliant compiler. Please let us know, whether you successfully compiled it with another C++ compiler.
There are possibilities:
The devel version requires a complete development environment, while the all-in-one version allows you to compile the ArangoDB without installing all the prerequisites. The disadvantage is that it takes longer to compile and you cannot make changes to the flex or bison files.
@sohgoh has reported that it is very easy to install ArangoDB on a Amazon Micro Instance:
> sudo yum install readline-devel > ./configure > make > make install
For detailed instructions the following section.
Verify that your system contains:
In addition you will need the following library:
Under Mac OS X you also need to install:
Download the latest source using GIT:
git clone git://github.com/triAGENS/ArangoDB.git
Switch into the ArangoDB directory
cd ArangoDB
In order to configure the build environment execute
./configure
to setup the makefiles. This will check the various system characteristics and installed libraries.
Compile the program by executing
make
This will compile the ArangoDB and create a binary of the server in
./bin/arangod
Check the binary by starting it using the command line.
./arangod --server.endpoint tcp://127.0.0.1:12345 /tmp/vocbase
This will start up the ArangoDB and listen for HTTP requests on port 12345 bound to IP address 127.0.0.1. You should see the startup messages
> ./arangod --server.endpoint tcp://127.0.0.1:12345 /tmp/vocbase 2012-02-05T13:23:52Z [455] INFO ArangoDB (version 1.x.y) is ready for business 2012-02-05T13:23:52Z [455] INFO HTTP client port: 12345 2012-02-05T13:23:52Z [455] INFO Have Fun!
Use your favorite browser to access the URL
http://127.0.0.1:12345/version
This should produce a JSON object like
{"server" : "arango", "version" : "1.x.y"}
as result.
Note that starting ArangoDB in this way will result in error messages being displayed, because the paths are not yet set up. This will be corrected in the next step.
Install everything by executing
make install
You must be root to do this or at least have write permission to the corresponding directories.
The server will by default be installed in
/usr/sbin/arangod
The configuration file will be installed in
/etc/arangodb/arangod.conf
The database will be installed in
/var/arangodb
The arango shell will be installed in
/usr/bin/arangosh
Verify that your system contains
In addition you will need the following libraries
To compile Google V8 yourself, you will also need Python 2 and SCons.
Some distributions, for example Centos 5, provide only very out-dated versions of FLEX, BISON, and the V8 engine. In that case you need to compile newer versions of the programs and/or libraries.
Install or download the prerequisites
if neccessary. Most linux systems already supply RPM or DEP for these packages. Please note that you have to install the development packages.
Download the latest source using GIT:
git clone git://github.com/triAGENS/ArangoDB.git
Switch into the ArangoDB directory
cd ArangoDB
The source tarball contains a pre-generated "configure" script. You can regenerate this script by using the GNU auto tools. In order to do so, execute
make setup
This will call aclocal, autoheader, automake, and autoconf in the correct order.
In order to configure the build environment execute
./configure --disable-all-in-one-v8 --disable-all-in-one-libev --enable-bison --enable-flex
to setup the makefiles. This will check for the various system characteristics and installed libraries. If the configure scripts fail to find the boost library, check that C++ is installed and working and that the boost-devel package was successfully installed.
Now continue with Compile.
The following configuration options exists:
--disable-all-in-one-boost
tells the build system to use the installed system version of BOOST instead of the supplied files in the 3rdParty directory.
--disable-all-in-one-libev
tells the build system to use the installed system version of LIBEV instead of compiling the supplied version from the 3rdParty disable in the make run.
--disable-all-in-one-protobuf
tells the build system to use the installed system version of protocol buffers instead of compiling the supplied version from the 3rdParty disable in the make run.
--disable-all-in-one-v8
tells the build system to use the installed system version of V8 instead of compiling the supplied version from the 3rdParty disable in the make run.
--enable-bison
tells the build system to use the BISON to regenerate the parser files. If disabled, the supplied files be used and you cannot make changes to the parser files. You need at least BISON 2.4.1.
--enable-flex
tells the build system to use the FLEX to regenerate the scanner files. If disabled, the supplied files be used and you cannot make changes to the scanner files. You need at least FLEX 2.5.35.