Introduction
EasyApache 4 Containers allow for the secure deployment of the Memcached daemon on AlmaLinux, Rocky Linux, CloudLinux 8/9 or Ubuntu operating systems on a per-individual-cPanel-user basis.
Procedure
EasyApache 4 Podman Containers require a few base packages, and have specific user compatibility requirements. Please ensure you've completed all steps in this guide.
Base Packages
First, ensure the necessary packages are installed. The "ea-podman" repository must be installed and enabled, and the "ea-podman" and "ea-memcached" packages must be installed
- Log into WHM.
- Navigate to "WHM / Software / Install Distro Packages."
- Search for "ea-podman" and ensure "ea-podman-repo" is installed.
- Search for "ea-podman" and ensure "ea-podman" is installed.
- Search for "ea-memcached" and ensure "ea-memcached16" is installed.
User Configuration
Next, you will need to ensure the cPanel user does not use CageFS or JailShell:
How do I change an account's shell?
How to exclude users from CageFS
Create the Container
Then, access the shell, either via SSH or via cPanel / Terminal:
How do I access the terminal within a cPanel account?
After logging into the cPanel user's command-line interface, install Memcached container:
/usr/local/cpanel/scripts/ea-podman install ea-memcached16
After you create the container, a directory with the container name is created that includes a Memcached socket file:
/home/$USER/ea-podman.d/container-name/memcached.sock
This socket file is the file you will direct your application to use as the Memcached location. If your application was previously configured to use an IP/domain and port, you should replace the port with port "0" and the path with:
unix:///home/$USER/ea-podman.d/container-name/memcached.sock