-
Notifications
You must be signed in to change notification settings - Fork 284
DEV: add build from source procedures #1319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
09a6c16
DEV: add build from source procedures
dwdougherty 56c516d
Apply review comments; added AlmaLinux and Ubuntu (Focal) pages
dwdougherty 7888116
Apply review comments; merged alma/rocky pages; added stubs for macOS
dwdougherty 29b55ac
Added macOS 13/14 page
dwdougherty 84a2dec
Apply code review comments and issues found whilst testing
dwdougherty f8ca1ef
Bug fix
dwdougherty b416dea
Change titles per Lior
dwdougherty 7ed8541
Remove bash requirement from alma/rocky; it's already there
dwdougherty 21013c0
Remove banner as instructs are complete
dwdougherty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
content/operate/oss_and_stack/install/build-stack/_index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
| categories: | ||
| - docs | ||
| - operate | ||
| - stack | ||
| - oss | ||
| description: Build Redis Community Edition on Linux and macOS | ||
| linkTitle: Build Redis CE from source | ||
| stack: true | ||
| title: Build Redis Community Edition | ||
| weight: 20 | ||
| bannerText: These build instructions are not yet complete for Redis CE 8.0 GA. For build instructions prior to Redis CE 8.0, see [this page]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-from-source" >}}). | ||
| bannerChildren: true | ||
| --- | ||
|
|
||
| Build instructions are provided for the following platforms: | ||
163 changes: 163 additions & 0 deletions
163
content/operate/oss_and_stack/install/build-stack/almalinux-rocky-8.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,163 @@ | ||
| --- | ||
| categories: | ||
| - docs | ||
| - operate | ||
| - stack | ||
| - oss | ||
| linkTitle: AlmaLinux/Rocky 8.10 | ||
| title: Build Redis Community Edition from source on AlmaLinux/Rocky Linux 8.10 | ||
| weight: 5 | ||
| --- | ||
|
|
||
| Follow the steps below to build Redis from source on a system running AlmaLinux and Rocky Linux 8.10. | ||
dwdougherty marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| {{< note >}} | ||
| Docker images used to produce these build notes: | ||
| - AlmaLinux: | ||
| - almalinux:8.10 | ||
| - almalinux:8.10-minimal | ||
| - Rocky Linux: | ||
| - rockylinux/rockylinux:8.10 | ||
| - rockylinux/rockylinux:8.10-minimal | ||
| {{< /note >}} | ||
|
|
||
| ## 1. Prepare the system | ||
|
|
||
| Clean the package metadata, enable required repositories, and install development tools: | ||
|
|
||
| ```bash | ||
| sudo dnf clean all | ||
dwdougherty marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| # Add GoReleaser repo | ||
| sudo tee /etc/yum.repos.d/goreleaser.repo > /dev/null <<EOF | ||
| [goreleaser] | ||
| name=GoReleaser | ||
| baseurl=https://repo.goreleaser.com/yum/ | ||
| enabled=1 | ||
| gpgcheck=0 | ||
| EOF | ||
|
|
||
| sudo dnf update -y | ||
| sudo dnf groupinstall "Development Tools" -y | ||
| sudo dnf config-manager --set-enabled powertools | ||
| sudo dnf install -y epel-release | ||
| ``` | ||
|
|
||
| ## 2. Install required packages | ||
|
|
||
| Install the build dependencies, Python 3.11, and supporting tools: | ||
|
|
||
| ```bash | ||
| sudo dnf install -y --nobest --skip-broken \ | ||
| pkg-config \ | ||
| wget \ | ||
| gcc-toolset-13-gcc \ | ||
| gcc-toolset-13-gcc-c++ \ | ||
| git \ | ||
| make \ | ||
| openssl \ | ||
| openssl-devel \ | ||
| python3.11 \ | ||
| python3.11-pip \ | ||
| python3.11-devel \ | ||
| unzip \ | ||
| rsync \ | ||
| clang \ | ||
| curl \ | ||
| libtool \ | ||
| automake \ | ||
| autoconf \ | ||
| jq \ | ||
| systemd-devel | ||
| ``` | ||
|
|
||
| Create a Python virtual environment: | ||
|
|
||
| ```bash | ||
| python3.11 -m venv /opt/venv | ||
| ``` | ||
|
|
||
| Enable the GCC toolset: | ||
|
|
||
| ```bash | ||
| sudo cp /opt/rh/gcc-toolset-13/enable /etc/profile.d/gcc-toolset-13.sh | ||
| echo "source /etc/profile.d/gcc-toolset-13.sh" | sudo tee -a /etc/bashrc | ||
| ``` | ||
|
|
||
| ## 3. Install CMake | ||
|
|
||
| Install CMake 3.25.1 manually: | ||
|
|
||
| ```bash | ||
| CMAKE_VERSION=3.25.1 | ||
| ARCH=$(uname -m) | ||
|
|
||
| if [ "$ARCH" = "x86_64" ]; then | ||
| CMAKE_FILE=cmake-${CMAKE_VERSION}-linux-x86_64.sh | ||
| else | ||
| CMAKE_FILE=cmake-${CMAKE_VERSION}-linux-aarch64.sh | ||
| fi | ||
|
|
||
| wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_FILE} | ||
| chmod +x ${CMAKE_FILE} | ||
| ./${CMAKE_FILE} --skip-license --prefix=/usr/local --exclude-subdir | ||
| rm ${CMAKE_FILE} | ||
|
|
||
| cmake --version | ||
| ``` | ||
|
|
||
| ## 4. Download and extract the Redis source | ||
|
|
||
| The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). | ||
|
|
||
| Download a specific version of the Redis source code zip archive from GitHub. For example, to download version `8.0`: | ||
|
|
||
| ```bash | ||
| wget -O redis.tar.gz https://github.com/redis/redis/archive/refs/tags/8.0.tar.gz | ||
| ``` | ||
|
|
||
| To download the latest stable Redis release, run the following: | ||
|
|
||
| ```bash | ||
| wget -O redis.tar.gz https://download.redis.io/redis-stable.tar.gz | ||
| ``` | ||
|
|
||
| Extract the source: | ||
|
|
||
| ```bash | ||
| tar xvf redis.tar.gz | ||
| ``` | ||
|
|
||
| ## 5. Build Redis | ||
|
|
||
| Enable the GCC toolset and build Redis with support for TLS and modules: | ||
|
|
||
| ```bash | ||
| source /etc/profile.d/gcc-toolset-13.sh | ||
| cd /usr/src/redis | ||
|
|
||
| export BUILD_TLS=yes | ||
| export BUILD_WITH_MODULES=yes | ||
| export INSTALL_RUST_TOOLCHAIN=yes | ||
| export DISABLE_WERRORS=yes | ||
|
|
||
| make -j "$(nproc)" all | ||
| sudo make install | ||
| ``` | ||
|
|
||
| ## 6. (Optional) Verify the installation | ||
|
|
||
| Check the installed Redis server and CLI versions: | ||
|
|
||
| ```bash | ||
| redis-server --version | ||
| redis-cli --version | ||
| ``` | ||
|
|
||
| ## 7. Start Redis | ||
|
|
||
| To start Redis, use the following command: | ||
|
|
||
| ```bash | ||
| redis-server /path/to/redis.conf | ||
dwdougherty marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
161 changes: 161 additions & 0 deletions
161
content/operate/oss_and_stack/install/build-stack/almalinux-rocky-9.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| --- | ||
| categories: | ||
| - docs | ||
| - operate | ||
| - stack | ||
| - oss | ||
| linkTitle: AlmaLinux/Rocky 9.5 | ||
| title: Build Redis Community Edition from source on AlmaLinux/Rocky Linux 9.5 | ||
| weight: 10 | ||
| --- | ||
|
|
||
| Follow the steps below to build Redis from source on a system running AlmaLinux and Rocky Linux 9.5. | ||
|
|
||
| {{< note >}} | ||
| Docker images used to produce these build notes: | ||
| - AlmaLinux: | ||
| - almalinux:9.5 | ||
| - almalinux:9.5-minimal | ||
| - Rocky Linux: | ||
| - rockylinux/rockylinux:9.5 | ||
| - rockylinux/rockylinux:9.5-minimal | ||
| {{< /note >}} | ||
|
|
||
| ## 1. Prepare the system | ||
|
|
||
| Enable the GoReleaser repository and install required packages: | ||
|
|
||
| ```bash | ||
| sudo tee /etc/yum.repos.d/goreleaser.repo > /dev/null <<EOF | ||
| [goreleaser] | ||
| name=GoReleaser | ||
| baseurl=https://repo.goreleaser.com/yum/ | ||
| enabled=1 | ||
| gpgcheck=0 | ||
| EOF | ||
|
|
||
| sudo dnf clean all | ||
| sudo dnf makecache | ||
| sudo dnf update -y | ||
| ``` | ||
|
|
||
| ## 2. Install required packages | ||
|
|
||
| Install build dependencies, GCC toolset, Python, and utilities: | ||
|
|
||
| ```bash | ||
| sudo dnf install -y --nobest --skip-broken \ | ||
| pkg-config \ | ||
| xz \ | ||
| wget \ | ||
| which \ | ||
| gcc-toolset-13-gcc \ | ||
| gcc-toolset-13-gcc-c++ \ | ||
| git \ | ||
| make \ | ||
| openssl \ | ||
| openssl-devel \ | ||
| python3 \ | ||
| python3-pip \ | ||
| python3-devel \ | ||
| unzip \ | ||
| rsync \ | ||
| clang \ | ||
| curl \ | ||
| libtool \ | ||
| automake \ | ||
| autoconf \ | ||
| jq \ | ||
| systemd-devel | ||
| ``` | ||
|
|
||
| Create a Python virtual environment: | ||
|
|
||
| ```bash | ||
| python3 -m venv /opt/venv | ||
| ``` | ||
|
|
||
| Enable the GCC toolset: | ||
|
|
||
| ```bash | ||
| sudo cp /opt/rh/gcc-toolset-13/enable /etc/profile.d/gcc-toolset-13.sh | ||
| echo "source /etc/profile.d/gcc-toolset-13.sh" | sudo tee -a /etc/bashrc | ||
| ``` | ||
|
|
||
| ## 3. Install CMake | ||
|
|
||
| Install CMake version 3.25.1 manually: | ||
|
|
||
| ```bash | ||
| CMAKE_VERSION=3.25.1 | ||
| ARCH=$(uname -m) | ||
|
|
||
| if [ "$ARCH" = "x86_64" ]; then | ||
| CMAKE_FILE=cmake-${CMAKE_VERSION}-linux-x86_64.sh | ||
| else | ||
| CMAKE_FILE=cmake-${CMAKE_VERSION}-linux-aarch64.sh | ||
| fi | ||
|
|
||
| wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_FILE} | ||
| chmod +x ${CMAKE_FILE} | ||
| ./${CMAKE_FILE} --skip-license --prefix=/usr/local --exclude-subdir | ||
| rm ${CMAKE_FILE} | ||
|
|
||
| cmake --version | ||
| ``` | ||
|
|
||
| ## 4. Download and extract the Redis source | ||
|
|
||
| The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). | ||
|
|
||
| Download a specific version of the Redis source code zip archive from GitHub. For example, to download version `8.0`: | ||
|
|
||
| ```bash | ||
| wget -O redis.tar.gz https://github.com/redis/redis/archive/refs/tags/8.0.tar.gz | ||
| ``` | ||
|
|
||
| To download the latest stable Redis release, run the following: | ||
|
|
||
| ```bash | ||
| wget -O redis.tar.gz https://download.redis.io/redis-stable.tar.gz | ||
| ``` | ||
|
|
||
| Extract the source: | ||
|
|
||
| ```bash | ||
| tar xvf redis.tar.gz | ||
| ``` | ||
|
|
||
| ## 5. Build Redis | ||
|
|
||
| Enable the GCC toolset and compile Redis with TLS and module support: | ||
|
|
||
| ```bash | ||
| source /etc/profile.d/gcc-toolset-13.sh | ||
| cd /usr/src/redis | ||
|
|
||
| export BUILD_TLS=yes | ||
| export BUILD_WITH_MODULES=yes | ||
| export INSTALL_RUST_TOOLCHAIN=yes | ||
| export DISABLE_WERRORS=yes | ||
|
|
||
| make -j "$(nproc)" all | ||
| sudo make install | ||
| ``` | ||
|
|
||
| ## 6. (Optional) Verify the installation | ||
|
|
||
| Check that Redis was installed successfully: | ||
|
|
||
| ```bash | ||
| redis-server --version | ||
| redis-cli --version | ||
| ``` | ||
|
|
||
| ## 7. Start Redis | ||
|
|
||
| To start Redis, use the following command: | ||
|
|
||
| ```bash | ||
| redis-server /path/to/redis.conf | ||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.