Skip to content

Commit

Permalink
doc: compile
Browse files Browse the repository at this point in the history
  • Loading branch information
adzfolc committed Nov 6, 2024
1 parent 1fbc9ba commit eea1d38
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,34 @@ Redis can be the slave of ror by directly executing the slaveof command. ROR rep
* libstdc++

3. Compilation Process
* 3.1 Get the source code
* 3.1 Install Library
```bash
# GCC versions among (gcc-9, gcc-10, gcc-11, gcc-12, gcc-13) are well supported.
# for Ubuntu/Debian
sudo apt update
sudo apt install -y build-essential libsnappy-dev libsnappy1v5 pkg-config zlib1g zlib1g-dev
# for CentOS/RHEL
sudo yum install -y zlib-devel-1.2.11 snappy-devel-1.1.8 jemalloc-5.2.1 procps-ng-3.3.17
# for Mac
# Ensure Homebrew is installed
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install required packages
brew install libsnappy pkg-config zlib
```
* 3.2 Get the source code
```bash
git clone https://github.com/ctripcorp/Redis-On-Rocks/
```
* 3.2 Switch to the latest release version
* 3.3 Switch to the latest release version
```bash
git tag # Check the latest release tag (e.g., ror-1.2.4)
git checkout TAG # Switch to the latest version (e.g., git checkout ror-1.2.4)
```
* 3.3 Execute compilation
* 3.4 Execute compilation
```bash
yum install -y zlib-devel-1.2.11 \
snappy-devel-1.1.8 \
jemalloc-5.2.1 \
procps-ng-3.3.17
cd Redis-On-Rocks
git submodule update --init --recursive
make
Expand Down
2 changes: 1 addition & 1 deletion deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ ROCKSDB_CFLAGS = $(CFLAGS)

rocksdb: .make-prerequisites
@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR)
cd rocksdb && ROCKSDB_DISABLE_BZIP=1 ROCKSDB_DISABLE_LZ4=1 ROCKSDB_DISABLE_ZSTD=1 ROCKSDB_DISABLE_MALLOC_USABLE_SIZE=1 ROCKSDB_DISABLE_MEMKIND=1 PORTABLE=1 ROCKSDB_USE_IO_URING=0 $(MAKE) CFLAGS="$(ROCKSDB_CFLAGS)" static_lib
cd rocksdb && ROCKSDB_DISABLE_BZIP=1 ROCKSDB_DISABLE_LZ4=1 ROCKSDB_DISABLE_ZSTD=1 ROCKSDB_DISABLE_MALLOC_USABLE_SIZE=1 ROCKSDB_DISABLE_MEMKIND=1 PORTABLE=1 ROCKSDB_USE_IO_URING=0 $(MAKE) CFLAGS="$(ROCKSDB_CFLAGS)" DISABLE_WARNING_AS_ERROR=1 static_lib

.PHONY: rocksdb

Expand Down

0 comments on commit eea1d38

Please sign in to comment.