Nebula Graph is developed based C++14, so it requires a compiler supporting C++14 features.
- Fedora 29, 30
- CentOS 6.5, 7.5
- Ubuntu 16.04, 18.04
When building type is DEBUG, an SSD disk with space more than 50GB is suggested.
And 8GB memory or more is required.
bash> git clone https://github.com/vesoft-inc/nebula.git
-
If you can download
OSS
packages,bash> cd nebula && ./build_dep.sh
-
If you cannot download
OSS
packages.
-
Install other dependencies through local sources
bash> cd nebula && ./build_dep.sh N
-
Download the corresponding version of the dependency package
- Install the package
tar xf ${package_name}.tar.gz
cd ${package_name} && ./install.sh
bash> source ~/.bashrc
bash> mkdir build && cd build
bash> cmake ..
bash> make
bash> sudo make install
Or you can build the release version.
bash> cmake -DCMAKE_BUILD_TYPE=Release ..
bash> make
bash> sudo make install
-
If no errors are shown
[100%] Built target ....
Congratulations! Compile successfully...
-
You can see there are four folders in the the installation directory /usr/local/nebula: etc/, bin/, scripts/, share/.
[root@centos7.5 nebula]# ls /usr/local/nebula/ bin etc scripts share
Now, you can start Nebula Graph!
After the above installation is completed, you can start the Nebula Graph services. The default directory of Nebula Graph is /usr/local/nebula
.
bash> cd /usr/local/nebula
Rename the configuration files for Nebula Graph services.
bash> cp etc/nebula-graphd.conf.default etc/nebula-graphd.conf
bash> cp etc/nebula-metad.conf.default etc/nebula-metad.conf
bash> cp etc/nebula-storaged.conf.default etc/nebula-storaged.conf
Start Nebula Graph services.
bash> ./scripts/nebula.service start all
bash> ./bin/nebula -u user -p password --port 3699 --addr="127.0.0.1"
nebula> SHOW HOSTS;
- Modify ~/.bashrc by appending following line to the end
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
- Update ~/.bashrc
bash> source ~/.bashrc
Error Info: [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- Get your java jdk version with the command
java -version
- If your java version is not
1.8.0_xxx
, please install it
bash> sudo apt-get -y install openjdk-8-jdk
bash> sudo yum -y install java-1.8.0-openjdk
bash> sudo update-alternatives --config java
Select the java-1.8.0-openjdk/java-8-openjdk
You need to compile the third-party by yourself, the installation path is /opt/nebula/third-party
Step 1: Download third-party src package
bash> wget https://nebula-graph.oss-accelerate.aliyuncs.com/third-party/nebula-3rdparty.tar.gz
Step 2: Build third-party
bash> tar xf nebula-3rdparty.tar.gz && cd nebula-3rdparty
bash> ./install_deps.sh
bash> cmake ./
bash> sudo make
Step 3: Configure the project's environment variables and download other dependencies
bash> cd nebula && ./build_dep.sh N
bash> source ~/.bashrc
bash> mkdir build && cd build
bash> cmake ..
bash> make