Redis Enterprise
Installation of your Redis Enterprise (RS) instance can be done via a Docker image, Amazon Web Services AMI, or a .tar
Installation package. This guide provides the steps for downloading and installing RS using the package file.
For this installation, three CentOS 7 Virtual Machines, each with 4 vCPUs, 16GB memory, 64GB of storage, and Static IP addresses were used. For additional details, see here.
Prerequisites
Note:
You must be the root user or have access to
sudo
to the root user to perform the installation.
The following conditions must be met before proceeding with your installation:
- Be sure your machines are up to date by running the
yum update -y
command. - Turn off
swap
by running theswapoff -a
command. To persist this change across reboots, you must comment theswap
entry in the/etc/fstab
file. - Install the
wget
package, used for downloading the RS installation file, by running theyum install wget
command.
Note:
During installation, Redis Enterprise downloads and installs the following dependency packages:
cyrus-sasl-scram
,boost-program-options
,cyrus-sasl
,cyrus-sasl-plain
,boost-serialization
, andcyrus-sasl-md5
. If the machine where you are installing RS does not have an internet connection, you must manually download and install these packages.
Installation
To install Redis Enterprise, follow these steps:
- Create the directory where RS is to be downloaded and extracted, for example:
mkdir redislabs
. - Change to the newly created directory using the command:
cd /<path-to>/redislabs/
. - Download the installation package by running
wget https://s3.amazonaws.com/redis-enterprise-software-downloads/5.4.0/redislabs-5.4.0-19-rhel7-x86_64.tar
. - Extract the package by running
tar vxf redislabs-5.4.0-19-rhel7-x86_64.tar
. - Start the installation with the command
./install.sh
. - During the installation process you are prompted to confirm the:
- Setup of NTP time synchronization for the cluster, enter
Y
; - Opening the firewall for ports used by RS, enter
Y
; - Running of
rlcheck
to confirm the proper configuration, enterY
.
- Setup of NTP time synchronization for the cluster, enter
You can automatically accept these defaults by adding the -y
parameter to the install
command, such as ./install.sh -y
.
Configuration
Before you can create and configure your RS cluster, there are several entries that must be created on your DNS server. You can do this manually, or by running the Powershell script below:
[CmdletBinding()]
Param
(
[Parameter(Mandatory = $true,
HelpMessage = "Name of the DNS zone:")]
[string]$DNSZone,
[Parameter(Mandatory = $true,
HelpMessage = "Name of the Redis cluster(Not FQDN):")]
[string]$RedisClusterName,
[Parameter(Mandatory = $true,
HelpMessage = "Redis node ip")]
[string []]$RedisNodeIP
)
Write-Host "Using DNS zone:"$DNSZone
Write-Host "Using Redis cluster name:"$RedisClusterName
for ($i = 1; $i -le $RedisNodeIP.Length; $i++) {
$redisNodeName = Read-Host "Please enter the name of the Redis node (in order of the IP provided earlier): "
$nodeFQDN = $redisNodeName + ".$DNSZone"
Add-DnsServerResourceRecordA -Name $redisNodeName -ZoneName $DNSZone -IPv4Address $RedisNodeIP -AllowUpdateAny
Add-DnsServerZoneDelegation -Name $DNSZone -ChildZoneName $RedisClusterName -NameServer $nodeFQDN -IPAddress $RedisNodeIP -PassThru
}
Enter values specific to your environment for these variables:
$DNSZone
- the name of the DNS zone dedicated for this purpose;$RedisClusterName
- a custom name for your RS cluster. Must be of type "NAMESERVER" (NS
) inside the DNS zone;$RedisNodeIP
- the names and IP addresses of all nodes to be included in the cluster.
Note:
You must have DNS administrative rights to create these entries.
Creating the Cluster
Follow these steps to create your Redis Enterprise cluster:
- Access the Redis Web application by navigating your browser to
https://<redis-machine-ip>:8443
. For example, if the node is installed on a machine with the 10.10.24.192 IP address, you have to navigate tohttps://10.10.24.192:8443
. - Click Setup. The Node Configuration page appears.
- Open the Cluster Configuration tab and:
a. select the Create new cluster radio button;
b. in the Cluster name (FQDN) field, enter thechildZoneName
created by the DNS server Powershell script above;
c. select the Enable rack-zone awareness check box. When enabled, this feature alters the placement of database shards and endpoints by RS. See here for details.
d. In the Rack-zone ID field, enter an ID for the node, for exampleRZ1
. Each node must have a unique ID. - Click Next. The Cluster authentication page appears.
- Enter your cluster key and click Next. The Set admin credentials page appears.
- Enter your email address and set a password. These are used to manage the cluster.
- Click Next. The cluster is created and you are redirected to the login page.
Adding a Node
Once you have created the cluster, follow these steps to join any additional nodes:
- Navigate to the RS management UI using the address:
https://<new_node_IP>:8443
.
For example, if the node is installed on a machine with the 10.10.25.192 IP address, you have to navigate tohttps://10.10.25.192:8443
. - Click Setup. The Node Configuration page appears.
- Open the Cluster Configuration tab and:
a. select the Join cluster radio button;
b. in the IP address of a node in the cluster field, enter the IP address of any node in the cluster;
c. in the Verify cluster admin credentials fields, enter the email and password used when creating the cluster. - Click Next. The Set rack-zone ID page appears.
- In the Rack-zone ID field, enter an ID for the node, for example
RZ2
. Each node must have a unique ID. - Click Next. The node is added to the cluster and the management UI appears.
See the RedisLabs Install guide for in-depth details on the installation and configuration of Redis Enterprise.
Creating the Database
A complete overview of the available options and configurations for your Redis database is beyond the scope of this section. For full details, see the official RedisLabs documentation.
Here we provide the steps to create a single region database, with replication enabled to provide high availability:
- Navigate to the RS management UI.
- Click the Databases tab. If no database exists, the Create new database window automatically appears. If there are existing databases, click the
+
button to open the Create new database window. - Select Redis database and, in the Deployment drop-down, select Single Region.
- Click Next. The Create database window is displayed.
- In the Name field, enter your desired name for the database.
- In the Memory limit field, set the desired limit for the database. The total available memory in the cluster is displayed next to the field.
- Select the Replication check box. The Rack-zone awareness check box is displayed.
- Select the Rack-zone awareness check box. This enables a more advanced logic for determining the master and slave nodes used for replication.
- In the Redis password field, you can optionally set a password for the database.
- Click Activate. The database is initialized and the Configuration screen is displayed.
- Note the Endpoint as that is the address used to access the database.
Your Redis Enterprise cluster is now ready, and you can proceed with the Orchestrator installation, as described here.
Redis Server on Linux
To install Redis Server on a Linux machine, follow the quick start guide here. If you are also deploying Redis server in a cluster, see here.
Redis Server on Windows
Important!
Redis on Windows is built by MSOpenTech, not Redis or RedisLabs. It has not been updated since July 2016 and is not supported. We strongly recommend the use of either Redis server, built by Redis and receiving community support, or Redis Enterprise, built and commercially supported by RedisLabs.
On a machine of your choosing, perform the following steps:
- Download the Redis Windows installer from here.
- Double-click
Redis-x64-3.0.504.msi
. The installation wizard is displayed. - Go through these steps:
a. Choose the destination folder and add the Redis installation folder to thePATH
environment variable.
b. Define the port to run Redis on and add an exception in the firewall for it. By default, the port is6379
.
c. Do not set a limit to the memory Redis uses. The server takes a maximum of 50% of the total RAM of the machine and, as a result, it does not affect the performance. - Click Install. Redis is installed on the selected machine.
- Navigate to the installation folder. By default, this is
C:\Program Files\Redis
. - Open the
redis.windows-service.conf
file using Notepad++ or any another source code editor. - Look for the
requirepass foobared
line. This attribute contains the default password for Redis Server and is commented out by default. - Uncomment the line by removing the
#
. - (Optionally) Change the default password.
- Save your changes.
- Proceed with the Orchestrator installation, as described here.
Updated 2 years ago