Skip to content
4 changes: 2 additions & 2 deletions content/operate/oss_and_stack/install/archive/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can install [Redis](https://redis.io/about/) or [Redis Stack](https://redis.

Here are the installation instructions:

* [Install Redis]({{< relref "/operate/oss_and_stack/install/install-redis" >}})
* [Install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack" >}})
* [Install Redis]({{< relref "/operate/oss_and_stack/install/archive/install-redis" >}})
* [Install Redis Stack]({{< relref "/operate/oss_and_stack/install/archive/install-stack" >}})

While you can install Redis or Redis Stack locally, you might also consider using Redis Cloud by creating a [free account](https://redis.com/try-free/?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users).
16 changes: 16 additions & 0 deletions content/operate/oss_and_stack/install/build-stack/_index.md
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 content/operate/oss_and_stack/install/build-stack/almalinux-rocky-8.md
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.

{{< 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

# 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
```
161 changes: 161 additions & 0 deletions content/operate/oss_and_stack/install/build-stack/almalinux-rocky-9.md
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
```
Loading