Skip to content

Commit

Permalink
add compile running
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Aug 16, 2022
1 parent 12b31ae commit 69c4000
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 50 deletions.
2 changes: 1 addition & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CeresDB 是一款高性能、分布式、Schema-less 的云原生时序数据库
项目目前在快速迭代中,早期版本可能存在数据不兼容问题,因此不推荐生产使用及性能测试。

## RoadMap
项目 [Roadmap](./docs/dev/roadmap-CN.md)
项目 [Roadmap](https://docs.ceresdb.io/dev/roadmap.html)

## 快速开始
### 获取代码
Expand Down
51 changes: 3 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,56 +13,11 @@ CeresDB is a high-performance, distributed, schema-less, cloud native time-serie
## Status
The project is currently under rapid development. This early stage is not production ready and may incur data corruptions.

## RoadMap

See our [RoadMap](./docs/dev/roadmap.md)

## Documentation
See https://docs.ceresdb.io/

## Develop
### Compile and run CeresDB
#### Install dependencies
In order to compile CeresDB, some relevant dependencies(including the `Rust` toolchain) should be installed.

#### Dependencies(Ubuntu20.04)
Assuming the development environment is Ubuntu20.04, execute the following command to install the required dependencies:
```shell
apt install git curl gcc g++ libssl-dev pkg-config cmake
```

It should be noted that the compilation of the project has version requirements for dependencies such as cmake, gcc, g++, etc. If your development environment is an old Linux distribution, it is necessary to manually install these dependencies of a higher version.

#### Dependencies(MacOS)
If the development environment is MacOS, execute the following command to install the required dependencies.

1. Install command line tools:
```shell
xcode-select --install
```
2. Install cmake:
```shell
brew install cmake
```

#### Rust
`Rust` can be installed by [rustup](https://rustup.rs/). After installing rustup, when entering the CeresDB project, the specified `Rust` version will be automatically downloaded according to the rust-toolchain file.

After execution, you need to add environment variables to use the `Rust` toolchain. Basically, just put the following commands into your `~/.bashrc` or `~/.bash_profile`:
```shell
source $HOME/.cargo/env
```

#### Compile and run
Compile CeresDB by the following command:
```
cargo build --release
```

Then you can run CeresDB using the default configuration file provided in the codebase.
```bash
./target/release/ceresdb-server --config ./docs/example.toml
```
- [User Guide](https://docs.ceresdb.io/)
- [Development Guide](https://docs.ceresdb.io/dev/compile_run.html)
- [Roadmap](https://docs.ceresdb.io/dev/roadmap.html)

## Contributing
Any contribution is welcome!
Expand Down
3 changes: 2 additions & 1 deletion docs/guides/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
- [Protocol](protocol.md)

# Dev Guide
- [Style guide](dev/style_guide.md)
- [Supported Platform](dev/platform.md)
- [Compile and Running](dev/compile_run.md)
- [Conventional Commit](dev/conventional_commit.md)
- [Style guide](dev/style_guide.md)
- [Roadmap](dev/roadmap.md)

# Technical and Design
Expand Down
1 change: 1 addition & 0 deletions docs/guides/src/dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Compile and Running
40 changes: 40 additions & 0 deletions docs/guides/src/dev/compile_run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
In order to compile CeresDB, some relevant dependencies(including the `Rust` toolchain) should be installed.

# Dependencies(Ubuntu20.04)
Assuming the development environment is Ubuntu20.04, execute the following command to install the required dependencies:
```shell
apt install git curl gcc g++ libssl-dev pkg-config cmake
```

It should be noted that the compilation of the project has version requirements for dependencies such as cmake, gcc, g++, etc. If your development environment is an old Linux distribution, it is necessary to manually install these dependencies of a higher version.

# Dependencies(MacOS)
If the development environment is MacOS, execute the following command to install the required dependencies.

1. Install command line tools:
```shell
xcode-select --install
```
2. Install cmake:
```shell
brew install cmake
```

# Rust
`Rust` can be installed by [rustup](https://rustup.rs/). After installing rustup, when entering the CeresDB project, the specified `Rust` version will be automatically downloaded according to the rust-toolchain file.

After execution, you need to add environment variables to use the `Rust` toolchain. Basically, just put the following commands into your `~/.bashrc` or `~/.bash_profile`:
```shell
source $HOME/.cargo/env
```

# Compile and run
Compile CeresDB by the following command:
```
cargo build --release
```

Then you can run CeresDB using the default configuration file provided in the codebase.
```bash
./target/release/ceresdb-server --config ./docs/example.toml
```

0 comments on commit 69c4000

Please sign in to comment.