Skip to main content

Memcached Installation Guide

This guide provides all the key information and getting-started instructions after a successful Memcached installation via DeploySage-CLI.

Getting Started

Memcached is a simple key-value store running in memory. You can interact with it using a tool like telnet or nc (netcat).

# Connect to the Memcached server
telnet localhost 11211

# Inside the telnet session:
# Store a key named "mykey" with the value "hello" for 60 seconds
set mykey 0 60 5
hello
STORED

# Retrieve the key
get mykey
VALUE mykey 0 5
hello
END

# Exit the session
quit

Service Management

Manage the Memcached service using standard systemctl commands.

# Start the Memcached service
sudo systemctl start memcached

# Stop the service
sudo systemctl stop memcached

# Check the service status
sudo systemctl status memcached

Configuration

The main configuration file allows you to adjust memory usage, port, and other runtime options.

To change the memory limit, edit the CACHESIZE variable in the configuration file. To change the listening address (e.g., to allow remote connections), modify the OPTIONS variable. Remember to restart the service (sudo systemctl restart memcached) for changes to take effect.

ItemValue
Configuration File/etc/sysconfig/memcached
Default Port11211
Default Cache Size64MB