Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 3.0.0 core comlilation #1034

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 18 additions & 53 deletions docs-2.0/4.deployment-and-installation/1.resource-preparations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@

This topic describes the requirements and suggestions for compiling and installing Nebula Graph, as well as how to estimate the resource you need to reserve for running a Nebula Graph cluster.

## Reading guide

If you are reading this topic with the questions listed below, click them to jump to their answers.

* [What do I need to compile Nebula Graph?](#requirements_for_compiling_the_nebula_graph_source_code)

* [What do I need to run Nebula Graph in a test environment?](#requirements_and_suggestions_for_installing_nebula_graph_in_test_environments)

* [What do I need to run Nebula Graph in a production environment?](#requirements_and_suggestions_for_installing_nebula_graph_in_production_environments)

* [How much memory and disk space do I need to reserve for my Nebula Graph cluster?](#capacity_requirements_for_running_a_nebula_graph_cluster)

## Requirements for compiling the Nebula Graph source code

### Hardware requirements for compiling Nebula Graph
Expand All @@ -26,7 +14,11 @@ If you are reading this topic with the questions listed below, click them to jum

### Supported operating systems for compiling Nebula Graph

For now, we can only compile Nebula Graph in the Linux system. We recommend that you use any Linux system with kernel version `2.6.32` or above.
For now, we can only compile Nebula Graph in the Linux system. We recommend that you use any Linux system with kernel version `4.15` or above.

!!! note

To install Nebula Graph on Linux systems with kernel version lower than required, use [RPM/DEB packages](2.compile-and-install-nebula-graph/2.install-nebula-graph-by-rpm-or-deb.md) or [TAR files](2.compile-and-install-nebula-graph/4.install-nebula-graph-from-tar.md).

### Software requirements for compiling Nebula Graph

Expand All @@ -44,10 +36,8 @@ You must have the correct version of the software listed below to compile Nebula
| readline-devel | Any stable version | - |
| ncurses-devel | Any stable version | - |
| zlib-devel | Any stable version | - |
| gcc | 7.5.0 or above | You can run `gcc -v` to check the gcc version. |
| gcc-c++ | Any stable version | - |
| cmake | 3.9.0 or above | You can run `cmake --version` to check the cmake version. |
| gettext | Any stable version | - |
| g++ | 8.5.0 or above | You can run `gcc -v` to check the gcc version. |
| cmake | 3.14.0 or above | You can run `cmake --version` to check the cmake version. |
| curl | Any stable version | - |
| redhat-lsb-core | Any stable version | - |
| libstdc++-static | Any stable version | Only needed in CentOS 8+, RedHat 8+, and Fedora systems. |
Expand All @@ -58,7 +48,7 @@ Other third-party software will be automatically downloaded and installed to the

### Prepare software for compiling Nebula Graph

This section guides you through the downloading and installation of software required for compiling Nebula Graph.
If part of the dependencies are missing or the versions does not meet the requirements, manually install them with the following steps. You can skip unnecessary dependencies or steps according to your needs.

1. Install dependencies.

Expand All @@ -78,7 +68,6 @@ This section guides you through the downloading and installation of software req
gcc \
gcc-c++ \
cmake \
gettext \
curl \
redhat-lsb-core \
bzip2
Expand Down Expand Up @@ -113,51 +102,27 @@ This section guides you through the downloading and installation of software req
$ cmake --version
```

If your GCC and CMake are in the right version, then you are all set. If they are not, follow the sub-steps as follows.
If your GCC and CMake are in the right versions, then you are all set and you can ignore the subsequent steps. If they are not, select and perform the needed steps as follows.

1. Clone the `nebula` repository to your host.
3. If the CMake version is incorrect, visit the CMake official website to install the required version.

```bash
$ git clone -b {{nebula.branch}} https://github.com/vesoft-inc/nebula-common.git
```

Users can use the `--branch` or `-b` option to specify the branch to be cloned. For example, for {{ nebula.release }}, run the following command.
4. If the G++ version is incorrect, visit the G++ official website or follow the instructions below to to install the required version.

```bash
$ git clone --branch {{nebula.branch }} https://github.com/vesoft-inc/nebula-common.git
```

1. Make `nebula` the current working directory.
- For CentOS users, run:

```bash
$ cd nebula
yum install centos-release-scl
yum install devtoolset-11
scl enable devtoolset-11 'bash'
```

1. Run the following commands to install and enable CMake and GCC.
- For Ubuntu users, run:

```bash
// Install CMake.
$ ./third-party/install-cmake.sh cmake-install

// Enable CMake.
$ source cmake-install/bin/enable-cmake.sh

// Authorize the write privilege to the opt directory.
$ sudo mkdir /opt/vesoft && sudo chmod -R a+w /opt/vesoft

// Install GCC. Installing GCC to the opt directory requires the write privilege. And users can change it to other locations.
$ ./third-party/install-gcc.sh --prefix=/opt

// Enable GCC.
$ source /opt/vesoft/toolset/gcc/7.5.0/enable
add-apt-repository ppa:ubuntu-toolchain-r/test
apt install gcc-11 g++-11
```

3. Execute the script `install-third-party.sh`.

```bash
$ ./third-party/install-third-party.sh
```

## Requirements and suggestions for installing Nebula Graph in test environments

### Hardware requirements for test environments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ Nebula Graph supports the following building types of `MAKE_BUILD_TYPE`:

It indicates building Nebula Graph with the optimization options for controlling the code size but not the debug info.

### ENABLE_INCLUDE_WHAT_YOU_USE

`ENABLE_INCLUDE_WHAT_YOU_USE` is `OFF` by default. When set to `ON` and include-what-you-use is installed on the system, the system reports redundant headers contained in the project source code during makefile generation.

### NEBULA_USE_LINKER

Specifies the program linker on the system. The available values are:

- `bfd`, the default value, indicates that ld.bfd is applied as the linker.
- `lld`, indicates that ld.lld, if installed on the system, is applied as the linker.
- `gold`, indicates that ld.gold, if installed on the system, is applied as the linker.

### CMAKE_C_COMPILER/CMAKE_CXX_COMPILER

Usually, CMake locates and uses a C/C++ compiler installed in the host automatically. But if your compiler is not installed at the standard path, or if you want to use a different one, run the command as follows to specify the installation path of the target compiler:
Expand Down