• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Install Memcached on Debian 10

Written by Admin, Updated On August 22, 2020
debian, memcached
How to Install Memcached on Debian 10

Memcached is an open-source, free and high-performance in-memory caching system. Generally, it’s used to speed up web applications by caching large volumes of data in memory from page load requests or API calls. This article explains how to install and configure Memcached on Debian 10.

Install Memcached on Debian#

The standard Debian repositories includes the Memcached package. Perform the following steps to install and configure Memcached on Debian 10.

Step 1 – Installing Memcached#

Run the following command as root or user with sudo privileges:

First update the package index list by typing:

sudo apt update

Now install the Memcached and required dependencies by following command:

sudo apt install memcached libmemcached-tools

Step 2 – Verify Installation#

Once the installation complete, the Memcached service will be start automatically. You can check the status for the service by typing:

sudo systemctl status memcached

It should show output something like this:

● memcached.service - memcached daemon
   Loaded: loaded (/lib/systemd/system/memcached.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-08-22 11:01:01 UTC; 27s ago
     Docs: man:memcached(1)

Step 3 – Configure Memcached#

By default, Memcached is set to listen only on localhost. Edit the /etc/memcached.conf file to configure the Memcached options. Generally, the default configuration settings are sufficient for most users.

Step 4 – Remote Access#

It is always recommended, do not allow remote access. It’s always risk of a distributed denial-of-service (DDoS) attack if the Memcached is configured improper. To allow remote access to the Memcached server, you need to configure the firewall and open the Memcached UDP port 11211 only from trusted clients.

For example, if you want to connect to the Memcached server over a private network, and the Memcached server IP is 192.168.93.125, and the client’s IP address is 192.168.123.32.

At first, you should edit the /etc/memcached.conf file and set the service to listen on the server’s private networking interface:

sudo nano /etc/memcached.conf

Find the line which starts with -l 127.0.0.1 and replace 127.0.0.1 with the server IP address 192.168.93.125.

-l 192.168.93.125

Restart the Memcached service for the changes to take effect:

sudo systemctl restart memcached

Now, open the Memcached port in the firewall:

sudo ufw allow from 192.168.123.32 to any port 11211

Conclusion#

We hope you learned successfully how to install Memcached on Debian 10. Visit Memcached Wiki to know more about Memcached.

If you have any questions or feedback, please leave a comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install Apache Cassandra on Ubuntu 20.04
Next Article   How to Install Postman on Ubuntu 20.04

Related Posts

  • How to Change Hostname Debian 11

    How to Change Hostname on Debian 11

    February 3, 2023
  • How to Install Python 3.11 on Debian 11

    How to Install Python on Debian 11

    January 25, 2023
  • How to Install Mongodb on Debian 11

    How to Install MongoDB on Debian 11 Linux

    January 11, 2023

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

  • How to Install SSH Keys on Ubuntu 22.04
    How to Set up SSH Keys on Ubuntu 22.04 January 7, 2023
  • How to Install Mongodb on Debian 11
    How to Install MongoDB on Debian 11 Linux January 11, 2023
  • How to Install Puppet Agent on Ubuntu 22.04
    How to Install Puppet Agent on Ubuntu 22.04 January 22, 2023
  • How to Install Jenkins on Debian 11
    How to Install Jenkins on Debian 11 January 5, 2023
  • How to Change-Hostname Ubuntu 22.04
    How to Change Hostname on Ubuntu 22.04 January 19, 2023
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook