dragonfly/docs/build-from-source.md
Roman Gershman 8f1a2a49b5
docs: Add how to build dragonfly on Fedora (#822)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-02-20 17:16:52 +02:00

71 lines
1.3 KiB
Markdown

# Build DragonflyDB From Source
## Running the server
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.
## Step 1 - install dependencies
On Debian/Ubuntu:
```bash
sudo apt install ninja-build libunwind-dev libboost-fiber-dev libssl-dev \
autoconf-archive libtool cmake g++ libzstd-dev
```
On Fedora:
```bash
sudo yum install automake boost-devel g++ git cmake libtool ninja-build libzstd-devel \
openssl-devel libunwind-devel autoconf-archive patch
```
## Step 2 - clone the project
```bash
git clone --recursive https://github.com/dragonflydb/dragonfly && cd dragonfly
```
## Step 3 - configure & build it
```bash
# Configure the build
./helio/blaze.sh -release
# Build
cd build-opt && ninja dragonfly
```
## Step 4 - voilà
```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"
127.0.0.1:6379>
```
## Step 6
Continue being great and build your app with the power of DragonflyDB!