Skip to content

Latest commit

 

History

History
194 lines (130 loc) · 4.28 KB

File metadata and controls

194 lines (130 loc) · 4.28 KB

Build Source Code

Prerequisite

Nebula Graph is developed based C++14, so it requires a compiler supporting C++14 features.

Supported System Version

  • Fedora 29, 30
  • CentOS 6.5, 7.5
  • Ubuntu 16.04, 18.04

Disk and Memory Suggestion

When building type is DEBUG, an SSD disk with space more than 50GB is suggested.

And 8GB memory or more is required.

Building Locally

Step 1: Clone Code

bash> git clone https://github.com/vesoft-inc/nebula.git

Step 2: Install Dependencies

  • If you can download OSS packages,

     bash> cd nebula && ./build_dep.sh
  • If you cannot download OSS packages.

  1. Install other dependencies through local sources

    bash> cd nebula && ./build_dep.sh N
  2. Download the corresponding version of the dependency package

  1. Install the package
tar xf ${package_name}.tar.gz
cd ${package_name} && ./install.sh

Step 3: Update ~/.bashrc

bash> source ~/.bashrc

Step 4A: Build Debug Version

bash> mkdir build && cd build
bash> cmake ..
bash> make
bash> sudo make install

Or you can build the release version.

Step 4B: Build Release Version and Regenerate the Makefile

bash> cmake -DCMAKE_BUILD_TYPE=Release ..
bash> make
bash> sudo make install

Building Completed

  • 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/.

    [[email protected] nebula]# ls /usr/local/nebula/
    bin  etc  scripts  share

Now, you can start Nebula Graph!

Start Nebula Graph Services

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;

Trouble Shooting

Error Info: /usr/bin/ld: cannot find Scrt1.o: No such file or directory

  1. Modify ~/.bashrc by appending following line to the end
export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
  1. 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?

  1. Get your java jdk version with the command java -version
  2. If your java version is not 1.8.0_xxx, please install it

Ubuntu

bash> sudo apt-get -y install openjdk-8-jdk

Centos

bash> sudo yum -y install java-1.8.0-openjdk

Switch Java Version

bash> sudo update-alternatives --config java

Select the java-1.8.0-openjdk/java-8-openjdk

Error Info: internal error

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