Skip to content

Commit a2d80ee

Browse files
authored
Update install-redis-on-linux.md
Fixes: redis#2037
1 parent 8663f15 commit a2d80ee

File tree

1 file changed

+34
-8
lines changed

1 file changed

+34
-8
lines changed

docs/install/install-redis/install-redis-on-linux.md

+34-8
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,43 @@ Most major Linux distributions provide packages for Redis.
1515
You can install recent stable versions of Redis from the official `packages.redis.io` APT repository.
1616

1717
{{% alert title="Prerequisites" color="warning" %}}
18-
If you're running a very minimal distribution (such as a Docker container) you may need to install `lsb-release`, `curl` and `gpg` first:
18+
If you're running a very minimal distribution (such as a Docker container) you may need to install `lsb-release`, `curl` and `gpg`:
1919

2020
{{< highlight bash >}}
2121
sudo apt install lsb-release curl gpg
2222
{{< / highlight >}}
2323
{{% /alert %}}
2424

25-
Add the repository to the <code>apt</code> index, update it, and then install:
25+
1. Add the repository to the <code>apt</code> and index the repository:
2626

27-
{{< highlight bash >}}
28-
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
27+
{{< highlight bash >}}
28+
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
2929

30-
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
30+
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
31+
{{< / highlight >}}
32+
33+
1. Update and install redis:
34+
{< highlight bash >}}
35+
sudo apt-get update
36+
sudo apt-get install redis
37+
{{< / highlight >}}
3138

32-
sudo apt-get update
33-
sudo apt-get install redis
34-
{{< / highlight >}}
39+
1. Verify that the installation is successful by checking the version of `redis-server` that is installed:
40+
{{< highlight bash >}}
41+
redis-server --version
42+
{{< / highlight >}}
3543

44+
The output is similar to:
45+
{{< highlight bash >}}
46+
Redis server v=7.2.3 sha=00000000:0 malloc=jemalloc-5.3.0 bits=64 build=7f52fd1717e1b756
47+
{{< / highlight >}}
48+
49+
1. Verify that you are able to connect to the `redis-server` using `redis-cli`:
50+
{{< highlight bash >}}
51+
redis-cli ping
52+
{{< / highlight >}}
53+
If the connection is succesfful you get a `PONG` in response.
54+
3655
## Install from Snapcraft
3756

3857
The [Snapcraft store](https://snapcraft.io/store) provides [Redis packages](https://snapcraft.io/redis) that can be installed on platforms that support snap.
@@ -45,3 +64,10 @@ sudo snap install redis
4564
{{< / highlight >}}
4665

4766
If your Linux does not currently have snap installed, install it using the instructions described in [Installing snapd](https://snapcraft.io/docs/installing-snapd).
67+
68+
## Next steps
69+
70+
After you have a running Redis instance, you may want to:
71+
72+
* Try the [Redis CLI tutorial](/docs/connect/cli).
73+
* Connect using one of the [Redis clients](/docs/connect/clients).

0 commit comments

Comments
 (0)