From eef806f02017289a2a2e7e36a4b9985c079628ee Mon Sep 17 00:00:00 2001 From: Abby <78209557+abby-cyber@users.noreply.github.com> Date: Fri, 29 Oct 2021 11:40:39 +0800 Subject: [PATCH] Update 1.install-nebula-graph-by-compiling-the-source-code.md --- ...bula-graph-by-compiling-the-source-code.md | 77 ++++++++----------- 1 file changed, 31 insertions(+), 46 deletions(-) diff --git a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md index 2381ee3956e..5d328d6a1c4 100644 --- a/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md +++ b/docs-2.0/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code.md @@ -10,31 +10,35 @@ Installing Nebula Graph from the source code allows you to customize the compili ## Installation steps +!!! Note + + Starting with the Nebula Graph {{ nebula.release }} release, the code repositories for Nebula-Graph, Nebula-Storage, and Nebula-Common have been merged into the Nebula code repository, so the compilation steps are different from those in previous releases. + 1. Use Git to clone the source code of Nebula Graph to the host. - - [Recommended] To install Nebula Graph v{{nebula.release}}, run the following command. + - [Recommended] To install Nebula Graph {{nebula.release}}, run the following command. - ```bash - $ git clone --branch v{{nebula.release}} https://github.com/vesoft-inc/nebula-graph.git - ``` + ```bash + $ git clone --branch {{nebula.branch}} https://github.com/vesoft-inc/nebula.git + ``` - - To install the latest developing release, run the following command to clone the source code from the master branch. + - To install the latest developing release, run the following command to clone the source code from the master branch. - ```bash - $ git clone https://github.com/vesoft-inc/nebula-graph.git - ``` + ```bash + $ git clone https://github.com/vesoft-inc/nebula.git + ``` -2. Make the `nebula-graph` directory the current working directory. +2. Make the `nebula` directory the current working directory. - ```bash - $ cd nebula-graph - ``` + ```bash + $ cd nebula + ``` 3. Create a `build` directory and make it the current working directory. - ```bash - $ mkdir build && cd build - ``` + ```bash + $ mkdir build && cd build + ``` 4. Generate Makefile with CMake. @@ -44,18 +48,9 @@ Installing Nebula Graph from the source code allows you to customize the compili For more information about CMake variables, see [CMake variables](#cmake_variables). - - If the source code of Nebula Graph v{{nebula.release}} is installed and cloned in step 1, run the following command. The `-DNEBULA_COMMON_REPO_TAG` and `-DNEBULA_STORAGE_REPO_TAG` options are used to specify the correct branches of [nebula-common](https://github.com/vesoft-inc/nebula-common) and [nebula-storage](https://github.com/ vesoft-inc/nebula-storage) repositories to keep the releases of the Nebula Graph components consistent. - - ```bash - $ cmake -DENABLE_BUILD_STORAGE=on -DENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release \ - -DNEBULA_COMMON_REPO_TAG=v{{ nebula.release }} -DNEBULA_STORAGE_REPO_TAG=v{{ nebula.release }} .. - ``` - - - If the source code of the `master` branch is installed in step 1, run the following command. - - ```bash - $ cmake -DENABLE_BUILD_STORAGE=on -DENABLE_TESTING=OFF -DENABLE_MODULE_UPDATE=ON -DCMAKE_BUILD_TYPE=Release .. - ``` + ```bash + $ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/nebula -DENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release .. + ``` 5. Compile Nebula Graph. @@ -65,15 +60,15 @@ Installing Nebula Graph from the source code allows you to customize the compili To speed up the compiling, use the `-j` option to set a concurrent number `N`. It should be $\min(\text{CPU}core number,\frac{the_memory_size(GB)}{2})$. - ```bash - $ make -j{N} # E.g., make -j2 - ``` + ```bash + $ make -j{N} # E.g., make -j2 + ``` 6. Install Nebula Graph. - ```bash - $ sudo make install-all - ``` + ```bash + $ sudo make install + ``` 7. The configuration files in the `etc/` directory (`/usr/local/nebula/etc` by default) are references. Users can create their own configuration files accordingly. If you want to use the scripts in the `script` directory to start, stop, restart, and kill the service, and check the service status, the configuration files have to be named as `nebula-graph.conf`, `nebula-metad.conf`, and `nebula-storaged.conf`. @@ -81,11 +76,9 @@ Installing Nebula Graph from the source code allows you to customize the compili The source code of the master branch changes frequently. If the corresponding Nebula Graph release is installed, update it in the following steps. - 1. In the `nebula-graph/` directory, run `git pull upstream master` to update the source code. +1. In the `nebula` directory, run `git pull upstream master` to update the source code. - 2. In the `nebula-graph/modules/common/` and `nebula-graph/modules/storage/` directories, run `git pull upstream master` separately. - - 3. In the `nebula-graph/build/` directory, run `make -j{N}` and `make install-all` again. +2. In the `nebula/build` directory, run `make -j{N}` and `make install` again. ## Next @@ -105,12 +98,6 @@ $ cmake -D= ... The following CMake variables can be used at the configure (cmake) stage to adjust the compiling settings. -### ENABLE_BUILD_STORAGE - -Starting from {{ nebula.release }}, Nebula Graph uses two separated github repositories of graph and storage for separated compiling. The `ENABLE_BUILD_STORAGE` variable is set to `OFF` by default so that the storage service is not installed together with the graph service. - -If you are deploying Nebula Graph on a single host for testing, you can set `ENABLE_BUILD_STORAGE` to `ON` to download and install the storage service automatically. - ### CMAKE_INSTALL_PREFIX `CMAKE_INSTALL_PREFIX` specifies the path where the service modules, scripts, configuration files are installed. The default path is `/usr/local/nebula`. @@ -158,7 +145,7 @@ $ cmake -DCMAKE_C_COMPILER= -DCMAKE_CXX_COMPILER=