You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-cache-for-redis/cache-how-to-redis-cli-tool.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ The redis-cli tool installs automatically with the Redis package, which is avail
23
23
24
24
### Install on Linux
25
25
26
-
The redis-cli tool runs natively on Linux, and most Linux distributions include a Redis package that contains redis-cli. On Ubuntu, for instance, you install the Redis package with the following commands:
26
+
The redis-cli tool runs natively on Linux, and most Linux distributions include a Redis package that contains redis-cli. For instance, you install the Redis package on Ubuntu with the following commands:
27
27
28
28
```linux
29
29
sudo apt-get update
@@ -32,13 +32,13 @@ sudo apt-get install redis
32
32
33
33
### Install on Windows
34
34
35
-
The best way to use redis-cli on Windows is to install the [Windows Subsystem for Linux (WSL2)](/windows/wsl/about), which allows you to run Linux tools directly on Windows. To install WSL, see [How to install Linux on Windows with WSL](/windows/wsl/install).
35
+
The best way to use redis-cli on Windows is to install the [Windows Subsystem for Linux (WSL)](/windows/wsl/about), which allows you to run Linux tools directly on Windows. To install WSL, see [How to install Linux on Windows with WSL](/windows/wsl/install).
36
36
37
37
Once installed, use WSL to install a Linux distro, and then install redis-cli by using the available package management for the Linux distro you chose. The default distro for WSL is Ubuntu. For more information, see [Install Redis on Windows](https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-windows/).
38
38
39
39
## Connect using redis-cli
40
40
41
-
To use redis-cli to connect to your Azure Redis cache as a client, you must specify the cache host name, ports, and keys. You can retrieve these values by the following methods:
41
+
To use redis-cli to connect to your Azure Redis cache as a client, you must specify the cache host name, port, and keys. You can retrieve these values by the following methods:
42
42
43
43
- Azure CLI using [az redis list-keys](/cli/azure/redis#az-redis-list-keys)
44
44
- Azure PowerShell using [Get-AzRedisCacheKey](/powershell/module/az.rediscache/Get-AzRedisCacheKey)
@@ -52,13 +52,14 @@ The following section describes how to get these values from the Azure portal.
52
52
53
53
Before connecting to your cache via redis-cli, determine the following information so you know what command options to use.
54
54
55
-
-**TLS**: By default, Azure Redis instances use [Transport Layer Security (TLS)](cache-remove-tls-10-11.md) encryption for connections. If the cache uses TLS, you must enable TLS for redis-cli by using the `--tls` option.
55
+
-**Transport Layer Security (TLS)**: By default, Azure Redis instances use [TLS](cache-remove-tls-10-11.md) encryption for connections. If the cache uses TLS, you must enable TLS for redis-cli by using the `--tls` option.
56
56
-**Port**: Enterprise and Enterprise Flash tier caches use port `10000`. Basic, Standard, and Premium tier caches use either port `6379` for non-TLS connections or port `6380` for TLS connections.
57
-
-**Clustering**: If you have a Premium tier cache that uses clustering, or an Enterprise or Enterprise Flash tier cache that uses OSS cluster policy, add the `-c`option to ensure all shards can be accessed.
57
+
-**Clustering**: If you have a Premium tier cache that uses clustering, or an Enterprise or Enterprise Flash tier cache that uses OSS cluster policy, add the `-c`option to ensure all shards can be accessed.
58
58
59
59
### Run the redis-cli connection command
60
60
61
61
Open a shell or terminal on a computer with the Redis package installed. On Windows, you can use WSL with [Windows Terminal](/windows/wsl/install#ways-to-run-multiple-linux-distributions-with-wsl) to open a Linux command line.
62
+
62
63
Run one of the following command lines, depending on your TLS, port, and clustering options. Replace the `<cache name>` and `<access key>` placeholders with the values for your cache.
63
64
64
65
- Connect to a Basic, Standard, or Premium tier Azure Redis instance that uses TLS:
@@ -91,9 +92,9 @@ Run one of the following command lines, depending on your TLS, port, and cluster
91
92
redis-cli -p 10000 -h <cache name>.eastus.redisenterprise.cache.azure.net -a <access key> -c
92
93
```
93
94
94
-
You're now connected to your Azure Redis cache using redis-cli.
95
+
You're now connected to your Azure Redis cache instance.
95
96
96
-
## Use redis-cli commands with your cache
97
+
## Use redis-cli commands with your Azure Redis cache
97
98
98
99
Once you establish the connection, you can issue commands to your Azure Redis instance. One easy way to test the connection is to use the [`PING`](https://redis.io/commands/ping/) command. The following command returns `PONG` in the console.
99
100
@@ -115,7 +116,7 @@ OK
115
116
116
117
You can also connect to your cache in the following other ways for troubleshooting or testing:
117
118
118
-
- Azure Cache for Redis offers a [Redis Console](cache-configure.md#redis-console) built into the Azure portal where you can issue commands without needing to install the command-line tool. The Redis Console feature is currently only available in the Basic, Standard, and Premium tiers.
119
+
- Azure Cache for Redis offers a [Redis Console](cache-configure.md#redis-console) built into the Azure portal where you can issue commands without needing the command-line tool. The Redis Console feature is currently available only in the Basic, Standard, and Premium tiers.
119
120
-[RedisInsight](https://redis.io/insight/) is a rich open-source graphical tool for issuing Redis commands and viewing the contents of a Redis instance. RedisInsight works with Azure Cache for Redis and is supported on Linux, Windows, and macOS.
Copy file name to clipboardExpand all lines: articles/azure-cache-for-redis/includes/redis-cache-access-keys.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,16 +4,18 @@ ms.topic: include
4
4
ms.custom: ignite-2024
5
5
---
6
6
7
-
### Get cache host name, ports, and access keys from the Azure portal
7
+
### Get cache host name, port, and access keys from the Azure portal
8
8
9
9
To connect to your Azure Redis cache, the cache client needs the cache host name, port, and keys. Some clients might refer to these items by slightly different names. Follow these instructions to get the cache host name, port, and keys from the [Azure portal](https://portal.azure.com).
10
10
11
-
- Copy the host name and port from the cache **Overview** page in the portal. The host name is of the form `<cache name>.redis.cache.windows.net`.
11
+
- Copy the host name and port from the cache **Overview** page in the portal. The host name is of the form `<cachename>.redis.cache.windows.net`.
0 commit comments