Compiling ArangoDB 3.0 on Ubuntu
source link: http://jsteemann.github.io/blog/2016/06/02/compiling-arangodb-3-dot-0-on-ubuntu/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
We have spent a lot of time working on ArangoDB 3.0. That version will not only provide major functionality and performance improvements, but will also come with an improved, CMake-based build system.
This post explains how to use CMake to build ArangoDB 3.0 on a recent Ubuntu Linux. For the impatient there’s a command summary at the end of this post.
Installing prerequisites
Here’s how to build ArangoDB 3.0 with cmake on a recent Ubuntu Linux.
Ubuntu 15.x and 16.x should have recent enough packages so any missing
prerequisites can be installed via a simple sudo apt-get install
command:
installing prerequisites
|
Older versions of Ubuntu can be convinced to work too, but this requires a g++ version of at least 4.9. Ubuntu 14 ships with older g++ versions by default, so you will first need to install a newer g++ version (see here or here for some external instructions). Once the g++ and gcc compilers are recent enough, install the other prerequisites.
Cloning ArangoDB
After having installed the prerequisites, clone the ArangoDB repository
from Github and then cd into the directory arangodb
that the cloning
will have created:
cloning ArangoDB
|
Then check out the 3.0 branch and pull the latest changes:
cloning ArangoDB
|
Building ArangoDB
A convention when using CMake is to not build directly in the source directory, but use a separate build directory instead. The benefit of this is that building in a separate directory won’t change the source directory, and the build directory can be disposed easily.
To create an initial build directory named build
and cd into it,
just type:
creating a build directory
|
It’s now time to invoke CMake. CMake should be executed from the build
directory, but needs to know where it’s build instructions file
(named CMakeLists.txt
is). This file is located in the source directory.
To run CMake without any specific options, we can use:
running CMake
|
This will run CMake from inside the build
directory and tell it to
look for CMakeLists.txt
in the source directory. The
-DCMAKE_BUILD_TYPE=RelWithDebInfo
part will tell CMake to build
binaries with optimizations and debug symbols. Other useful build
types are:
-DCMAKE_BUILD_TYPE=Debug
: without optimizations, for debugging only-DCMAKE_BUILD_TYPE=Release
: with optimizations, no debug symbols, not useful for debugging
Invoking CMake will perform some checks for required components, compiler
and platform features. If anything fails, it should print some error
message. If everything works well, the command should have created a
Makefile
in the build
directory.
side note: CMake on Linux will by default generate UNIX Makefile
s,
but it can also be told to generate ninja
files instead. On Windows it can generate solution files for Visual
Studio.
Now that the Makefile
is there, we can run make
as usual (note that
the -j4
means to build with 4 parallel processes – adjust as needed!):
running make
|
Starting arangod and arangosh
And that’s already it for a normal build. Note that the build artefacts
and thus the binaries will also be created inside the build
directory.
arangod
and arangosh
will be located in the bin
subdirectory of
the build
directory. There is no need to install these binaries, they
can be run without installing them first. However, starting them from
inside the build directory will not work, because they will complain
about missing files. It is better to cd one level up first and then
start them:
starting arangod
|
The former will start arangod with default configuration, with a fresh
database directory located in ~/testdata
.
If you ran all the commands on your local machine (127.0.0.1) then you can now open a browser and point it to http://127.0.0.1:8529/. This should bring up ArangoDB’s web interface.
You can alternatively start an ArangoShell to connect to the ArangoDB
server. In another terminal window, cd into the arangodb
directory and
start an ArangoShell as follows:
starting arangosh
|
You should now see the ArangoShell prompt and be able to type some commands!
Command summary
Note: in contrast to the above step-by-step instructions, some commands here have been put together on a single line to make developer’s life easier.
installing prerequisites
|
|
|
Recommend
-
43
This year we got a lot of requests from our customers to provide Spring Data support for ArangoDB. So we listened and teamed up with one of our bigger customers from the financial sector to develop a Spring Data implementation for ArangoDB. We h...
-
6
``` docker pull arangodb ``` # Quick reference - **Maintained by**: [ArangoDB](https://github.com/arangodb/arangodb-docker) - **Where to get help**: [the Docker Community Forums](https://forums.docker.com/), [the Docker Community Sla...
-
3
Monday, February 11. 2019 Compiling http extension on ubuntu 18.04
-
9
FSharp.ArangoDB This project is in alpha release FSharp.ArangoDB is a...
-
5
BI Connectors for Tableau, Qlik, PowerBI and others Looking for a way to connect your BI solution with ArangoDB? You can use one of our BI Connectors – Qlik, Tableau, Power BI or Grafana to...
-
2
September 2021: What’s the Latest with ArangoDB? October 5, 2021NewsletterTags: ...
-
4
ArangoDB DGL Adapter Getting Started Guide¶
-
3
<?xml encoding="utf-8" ??>ArangoDB is an open-source NoSQL database used in modern web applications, which supports models for document, graph, and key-value data....
-
1
Compiling an Optimized Version of ArangoDB Jun 9th, 2016 Why should you care about compiling ArangoDB on your own when there are official release packages that are ready to use? There are th...
-
0
Compiling a debug version of ArangoDB is a must for everyone that wants to modify the C++ ArangoDB source code and test their changes locally. How to do this is different in the 2.8 and 3.0 branches of ArangoDB, but luckily it’s reall...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK