Merge pull request #3299 from goldeagle/patch-1

improve the readme document with building steps
This commit is contained in:
Shengliang Guan 2020-09-01 09:41:28 +08:00 committed by GitHub
commit 9b727bf822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 59 additions and 14 deletions

View File

@ -29,24 +29,69 @@ For user manual, system design and architecture, engineering blogs, refer to [TD
# Building # Building
At the moment, TDengine only supports building and running on Linux systems. You can choose to [install from packages](https://www.taosdata.com/en/getting-started/#Install-from-Package) or from the source code. This quick guide is for installation from the source only. At the moment, TDengine only supports building and running on Linux systems. You can choose to [install from packages](https://www.taosdata.com/en/getting-started/#Install-from-Package) or from the source code. This quick guide is for installation from the source only.
To build TDengine, use [CMake](https://cmake.org/) 2.8 or higher versions in the project directory. Install CMake for example on Ubuntu: To build TDengine, use [CMake](https://cmake.org/) 3.5 or higher versions in the project directory.
```
sudo apt-get install -y cmake build-essential ## Install tools
### Ubuntu & Debian:
```bash
sudo apt-get install -y gcc cmake build-essential git
``` ```
To compile and package the JDBC driver source code, you should have a Java jdk-8 or higher and Apache Maven 2.7 or higher installed. To compile and package the JDBC driver source code, you should have a Java jdk-8 or higher and Apache Maven 2.7 or higher installed.
To install openjdk-8 on Ubuntu: To install openjdk-8:
``` ```bash
sudo apt-get install openjdk-8-jdk sudo apt-get install -y openjdk-8-jdk
```
To install Apache Maven on Ubuntu:
```
sudo apt-get install maven
``` ```
Build TDengine: To install Apache Maven:
```bash
sudo apt-get install -y maven
``` ```
### Centos 7:
```bash
sudo yum install -y gcc gcc-c++ make cmake3 epel-release git
sudo yum remove -y cmake
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
```
To install openjdk-8:
```bash
sudo yum install -y java-1.8.0-openjdk
```
To install Apache Maven:
```bash
sudo yum install -y maven
```
### Centos 8 & Fedora:
```bash
sudo dnf install -y gcc gcc-c++ make cmake epel-release git
```
To install openjdk-8:
```bash
sudo dnf install -y java-1.8.0-openjdk
```
To install Apache Maven:
```bash
sudo dnf install -y maven
```
## Get the source codes
- github:
```bash
git clone https://github.com/taosdata/TDengine.git
cd TDengine
```
## Build TDengine
```bash
mkdir debug && cd debug mkdir debug && cd debug
cmake .. && cmake --build . cmake .. && cmake --build .
``` ```
@ -54,12 +99,12 @@ cmake .. && cmake --build .
To compile on an ARM processor (aarch64 or aarch32), please add option CPUTYPE as below: To compile on an ARM processor (aarch64 or aarch32), please add option CPUTYPE as below:
aarch64: aarch64:
```cmd ```bash
cmake .. -DCPUTYPE=aarch64 && cmake --build . cmake .. -DCPUTYPE=aarch64 && cmake --build .
``` ```
aarch32: aarch32:
```cmd ```bash
cmake .. -DCPUTYPE=aarch32 && cmake --build . cmake .. -DCPUTYPE=aarch32 && cmake --build .
``` ```