Installing and Configuring Memcached on Ubuntu

Technical Articles

Solution
Application
Content Type
Technical Documentation
Utilities & Services
ft:locale
en-US
  1. Install Memcached on the server with the following command:
    sudo apt-get install memcached
  2. Customize the /etc/memcached.conf configuration file as an administrator, with the following changes:
    sudo nano /etc/memcached.conf
    1. Increase the memory cap:
      -m 1024
      Note:

      The memory cap is set in MB. The recommended minimum memory cap is 1024 MB.

    2. Disable UDP:
      -U 0
      Note:

      Jamf Pro does not utilize UDP in its caching. You can disable UDP by specifying –U 0 explicitly (if it is not already disabled via other means).

    3. Update the interface to listen on:
      -l <IP address>
      Note:

      You may specify multiple IP addresses separated by commas or by using -l multiple times. IP addresses should use the external interface of the Memcached server to ensure the Jamf Pro nodes can connect to the cache. According to the memcached.conf file, "This parameter is one of the only security measures that memcached has, so make sure it's listening on a firewalled interface".

    4. Update the port to listen on:
      -p <Port>
      Note:

      The default port that's used is 11211. You must ensure that any firewalls allow inbound traffic on the port specified. If you change the port, it must be specified within this file and also within the memcached.properties file located on the Jamf Pro sever.

  3. Restart the service:
    sudo /etc/init.d/memcached restart
  4. Continue to steps for Enabling Memcached.
  5. Repeat for any additional Memcached endpoints.