Redis 企业软件快速入门

设置适用于 Linux 的 Redis Enterprise Software 的测试部署。

Redis 企业软件

本指南可帮助您在 Linux 主机上安装 Redis Enterprise Software 以测试其功能。

完成后,您将拥有一个具有单个节点的简单集群:

  1. 确保端口可用性

  2. 安装 Redis Enterprise Software

  3. 设置 Redis Enterprise Software 集群

  4. 创建新的 Redis 数据库

  5. 连接到 Redis 数据库

注意:
本快速入门仅用于本地测试。对于生产环境,请参阅安装和设置指南,了解部署选项和说明。

确保端口可用性

如果 Redis 分配给数据库的端口正在作系统或其他进程使用,则安装将失败。

按照相关部分配置所需的端口。

有关推荐和可选的端口配置,请参阅网络端口配置

更新sysctl.conf避免端口冲突

为避免端口冲突,请更新/etc/sysctl.conf包括:

net.ipv4.ip_local_port_range = 30000 65535

OS conflicts with port 53

If port 53 is in use, the installation fails. This issue can occur in default installations of certain operating systems in which systemd-resolved (DNS server) is running.

To prevent this issue, change the system configuration to make this port available before installation.

  1. Edit /etc/systemd/resolved.conf:

    sudo vi /etc/systemd/resolved.conf
    
  2. Add DNSStubListener=no as the last line in the file and save the file.

  3. Rename the current /etc/resolv.conf file:

    sudo mv /etc/resolv.conf /etc/resolv.conf.orig
    
  4. Create a symbolic link for /etc/resolv.conf:

    sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
    
    Note:
    You might encounter a temporary name resolution error (sudo: unable to resolve host {hostname}: Temporary failure in name resolution), which should be fixed when you restart systemd-resolved in the next step.
  5. Restart the DNS service:

    sudo service systemd-resolved restart
    

Configuration for AWS and GCP

For detailed configuration instructions, see your cloud provider's documentation.

  1. Create a VPC that you can use with regional subnets.

  2. Within this VPC, create firewall rules that allow external and internal access for Redis Enterprise Software.

Ingress/Egress Source Protocol Ports Other protocols
Ingress 0.0.0.0/0 TCP 21, 22, 53, 8001, 8443, 9443, 8070, 10000-19999 ICMP
Ingress 0.0.0.0/0 UDP 53, 5353
Ingress 10.0.0.0/8 (if subnets use 10. ranges) all all

Install Redis Enterprise Software

To install Redis Enterprise Software:

  1. Download the installation files from the Redis Enterprise Download Center and copy the download package to a machine with a Linux-based OS.

    Note:
    You are required to create a free account to access the download center.
  2. Extract the installation files:

    tar vxf <downloaded tar file name>
    
  3. Run the install.sh script in the current directory:

    sudo ./install.sh -y
    

Set up a cluster

To set up your machine as a Redis Enterprise Software cluster:

  1. In a browser, go to https://<name-or-IP-address-of-the-machine-with-Redis-Enterprise-Software-installed>:8443 to access the Cluster Manager UI. If you use a browser on the host machine, you can also access the Cluster Manager UI at https://localhost:8443.

    The cluster generates self-signed TLS certificates to secure the connection. Because these self-signed certificates are unknown to the browser, you must accept them before you proceed.

    If the server does not show the sign-in screen, try again after a few minutes.

  2. Select Create new cluster.

    When you first install Redis Enterprise Software, you need to set up a cluster.
  3. Enter an email and password for the administrator account, then select Next to proceed to cluster setup.

    Set the credentials for your admin user.

    You can also use these credentials to connect to the REST API.

  4. Enter your cluster license key if you have one. Otherwise, a trial version is installed.

    Enter your cluster license key if you have one.
  5. In the Configuration section, enter a cluster FQDN such as cluster.local, then select Next.

    Configure the cluster FQDN.
    Warning:
    If the FQDN is cluster.local, you cannot configure DNS. You cannot change the FQDN after cluster creation.
  6. On the node setup screen, select Create cluster to accept the defaults.

    Configure the node specific settings.
  7. Select OK to acknowledge the replacement of the HTTPS TLS certificate on the node. If you receive a browser warning, you can proceed safely.

    Modal shown when a page refresh is needed because the certificates have been updated.

Create a database

  1. On the Databases screen, select Quick database.

    Select Quick database on the Databases screen.
  2. Enter 12000 for the Port.

    If port 12000 is not available, enter any available port number between 10000 to 19999 or leave it blank to let the cluster assign a port number for you. You will use this port number to connect to the database.

    Create a quick database.
  3. Select Create to create your database.

When you see Database active appear on the database configuration screen, the database is activated and ready for you to use.

Database active icon.

You now have a Redis database!

Connect to your database

After you create the Redis database, you can connect to it and store data. See Test client connection for connection options and examples.

Supported web browsers

To use the Redis Enterprise Software Cluster Manager UI, you need a modern browser with JavaScript enabled.

The Cluster Manager UI is officially supported for the latest version of Google Chrome, as well as the three previous and three subsequent versions.

Continue learning with Redis University

See the Get started with Redis Software learning path for courses.

RATE THIS PAGE
Back to top ↑