Valkey via Containers
Last modified: September 10, 2024
Overview
This document explains how to set up Valkey™ in an EasyApache 4 container. Valkey is a distributed memory-caching system forked from Redis 7.2.4 as a replacement. This document only applies to the EasyApache 4-provided Valkey package.
We provide Valkey 7.2 for use with containers. You can only install container-based packages on systems that use EasyApache 4’s containers and run AlmaLinux OS, Rocky Linux™, or Ubuntu®.
container-name
represents the name of your Valkey container. You can find the containers’ names with either the registered
or running
options of the /usr/local/cpanel/scripts/ea-podman
script.
Install Valkey
The following steps must be performed as the root
user.
To install Valkey in a container on a system that runs EasyApache 4, you must first set up EasyApache 4 containers on your system.
After you set up containers on your system, install the ea-valkey72
package to add Valkey to your system.
Then, run one of the following commands to install the Valkey package on your server:
To install Valkey on AlmaLinux or Rocky Linux, run the following command:
dnf install -y ea-valkey72
To install Valkey on Ubuntu, run the following commands:
|
|
Set up Valkey inside containers
To set up Valkey to run inside a container, perform the following steps:
- Log in to the cPanel user account via SSH. You can log in to the account via SSH using one of the following methods:
- The command line.
- cPanel’s Terminal interface (cPanel » Home » Advanced » Terminal).
- Run the following command to set up Valkey inside your container:
/usr/local/cpanel/scripts/ea-podman install ea-valkey72
- Run the following command to retrieve the container’s name. You will need this name to perform any further actions.
/usr/local/cpanel/scripts/ea-podman containers
For more information, read our /usr/local/cpanel/scripts/ea-podman
script documentation.
Configure Valkey in a container
- cPanel users must have shell access to configure Valkey in a container.
- The cPanel account’s shell access must use the Normal Shell* option in WHM’s Manage Shell Access interface (WHM » Home » Account Functions » Manage Shell Access). The user cannot use the Valkey container with the Jailed option.
When you install Valkey into a container, it creates a directory in the ~/ea-podman.d/container-name
directory in the user’s home
directory. The system creates the valkey.sock
socket when it sets up Valkey.
To use Valkey with your applications, direct your application to use the ~/ea-podman.d/container-name/valkey.sock
socket.