Skip to main content

Recommended memcached installation method for multi-user support

Comments

9 comments

  • SimpleSonic
    It's pretty easy to install memcached. Run the following command as root: yum -y install memcached Then use EA4 to install the phpXX-php-memcached PHP modules for the PHP versions you need it.
    0
  • SimpleTechGuy
    Awesome, thank you @ResellerWiz! That is definitely easy enough lol, looks like the method for installing server wide. I guess I'm trying to figure out if there is any built in security with this option that would prevent memory leaks between user accounts and to control how much memory us available per user.
    0
  • cPRex Jurassic Moderator
    You might want to check the "Creating a Secure Memcached Configuration" option in our post here to see one way to secure that:
    0
  • SimpleTechGuy
    Thank you @cPRex, that blog post confirmed exactly what I was worried about. Specifically this: [QUOTE]Before we begin, a word of warning: the method outlined here should only be used on single-tenant dedicated servers, such as cPanel solo and virtual server hosting. It is not suitable for multi-tenant shared hosting environments without additional configuration to enable authentication or encryption.
    it's really starting to sound like the best option for a multi-user / multi-tenant setup is to install EasyApache 4 Containers (ea-podman) and use memcached (ea-memcached16) as a socket inside the container. This way each user has it's own version of memcached which is isolated by the socket inside the container registered to that user account. So. I'm thinking the install would look something like this: Install EasyApache 4 Container package on the root server: dnf install ea-podman-repo dnf install ea-podman dnf install ea-tomcat100
    Login to each user account via ssh and install EA4 memcached package into the users container: /usr/local/cpanel/scripts/ea-podman install ea-memcached16
    Get the container name: /usr/local/cpanel/scripts/ea-podman containers
    Figure out how to get wordpress to recognize the new socket: To use Memcached with your applications, direct your application to use the ~/container-name/memcache.sock socket. Does this sound about right?
    0
  • cPRex Jurassic Moderator
    That all does sound right to me, although I still think you'd have more CPU and RAM control with CloudLinux.
    0
  • SimpleSonic
    That all does sound right to me, although I still think you'd have more CPU and RAM control with CloudLinux.

    Agreed. Was going to suggest CloudLinux as well.
    0
  • WorkinOnIt
    Jumping in to ask a question: [QUOTE]Before we begin, a word of warning: the method outlined here should only be used on single-tenant dedicated servers, such as cPanel solo and virtual server hosting. It is not suitable for multi-tenant shared hosting environments without additional configuration to enable authentication or encryption.
    Why is it not suitable for a shared server? I thought the whole point of memcached was to try to reduce server resources being used - and that's typical of a shared server. [QUOTE]... It is not suitable for multi-tenant shared hosting environments without additional configuration to enable authentication or encryption.
    I'd like to install on my test server and have a play: So where can I find out the additional configuration needed to enable operation on a shared server?
    0
  • cPRex Jurassic Moderator
    The "additional details" are what @SimpleTechGuy posted, which were taken from this page:
    0
  • WorkinOnIt
    Thanks @cPRex @SimpleTechGuy - Can you share which path you have taken? I'm keen to explore a server side caching solution for WP.
    0

Please sign in to leave a comment.