2022-06-10 13:30:05 +00:00
|
|
|
# Build DragonflyDB From Source
|
|
|
|
|
|
|
|
## Running the server
|
|
|
|
|
2022-10-04 08:11:09 +00:00
|
|
|
Dragonfly runs on linux. We advice running it on linux version 5.11 or later
|
|
|
|
but you can also run Dragonfly on older kernels as well.
|
2022-06-10 13:30:05 +00:00
|
|
|
|
|
|
|
### WARNING: Building from source on older kernels WILL NOT WORK.
|
|
|
|
|
|
|
|
## Step 1
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone --recursive https://github.com/dragonflydb/dragonfly && cd dragonfly
|
|
|
|
```
|
|
|
|
|
|
|
|
## Step 2
|
|
|
|
```bash
|
|
|
|
# Install dependencies
|
|
|
|
sudo apt install ninja-build libunwind-dev libboost-fiber-dev libssl-dev \
|
2022-11-29 09:12:51 +00:00
|
|
|
autoconf-archive libtool cmake g++ libzstd-dev
|
2022-06-10 13:30:05 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Step 3
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# Configure the build
|
|
|
|
./helio/blaze.sh -release
|
|
|
|
|
|
|
|
# Build
|
|
|
|
cd build-opt && ninja dragonfly
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## Step 4
|
|
|
|
```bash
|
|
|
|
# Run
|
|
|
|
./dragonfly --alsologtostderr
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
Dragonfly DB will answer to both `http` and `redis` requests out of the box!
|
|
|
|
|
|
|
|
You can use `redis-cli` to connect to `localhost:6379` or open a browser and visit `http://localhost:6379`
|
|
|
|
|
|
|
|
## Step 5
|
|
|
|
|
|
|
|
Connect with a redis client
|
|
|
|
|
|
|
|
```bash
|
|
|
|
redis-cli
|
|
|
|
127.0.0.1:6379> set hello world
|
|
|
|
OK
|
|
|
|
127.0.0.1:6379> keys *
|
|
|
|
1) "hello"
|
|
|
|
127.0.0.1:6379> get hello
|
|
|
|
"world"
|
2022-10-04 08:11:09 +00:00
|
|
|
127.0.0.1:6379>
|
2022-06-10 13:30:05 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Step 6
|
|
|
|
|
2022-10-31 15:45:48 +00:00
|
|
|
Continue being great and build your app with the power of DragonflyDB!
|