Memcached is a distributed memory caching system. It allows web applications to store data in memory and access it quickly. When connecting to the Memcached server via TCP and IP protocols, data is provided with a unique key value and stored as strings in memory. Stored data can be permanent or temporary. Well, in case of staging, cached data will be deleted automatically after the configured time interval. ..

Memcached is already included in the default Ubuntu 20.04 repository, so you don’t need to add any additional repositories. You can install Memcached using the apt package manager by following these steps:

  1. Open the APT package manager by typing “apt” in a terminal window.
  2. Type the command “apt-get update” to make sure that the package list is up-to-date.
  3. Type the command “apt-get install memcached” to install Memcached on your system. ..

Steps to Install Memcached on Linux Server Running Ubuntu 20.04 LTS

Installing Memcached

sudo apt-get update Step 2: Then install memcached using the following command: sudo apt-get install memcached ..

First, install the official package from the Ubuntu repositories. ..

apt-get install memcached-tools

Step 4: Install Memcached as a service on your server and use tools to test your connectivity.

systemctl start memcached systemctl stop memcached

Configuring Memcached Network Settings

Edit the Memcached configuration file to allow remote access

Edit the file as follows:

memcached_server = “127.0.0.1” memcached_port = “3306”

Step 2: change the following values to: Step 2: Change the following values to: Step 2: Change the following values to: Step 2: Change the following values to: The first step in changing your company’s culture is to identify and change the values that guide your work and how you think. To do this, you’ll need to identify what motivates your employees and what makes them feel good about themselves. You can do this by looking at your company’s mission,Values statement, or corporate culture. Once you’ve identified these things, it’s time to start changing them.

Save the file and close it. Then restart the Memcached service to implement the changes.

The daemon defaults to 1024-c, which can be increased to 2048-c if needed. This limit will prevent too many connections from being made at once, which can lead to a slowdowns or even crashes.

memcached status This will show you the Memcached status of your server.

Configure PHP to use Memcached

Memcached is now installed and configured. You can configure PHP to use Memcached.

sudo apt-get install apache2 php5-apache2 Step 2: Create a new file called index.php in your web root and add the following code:

Step 3: Open your browser and navigate to http://localhost/index.php to view the information about your PHP installation. ..

php -S localhost:8080 -t sample.php This will create a sample PHP file in the Apache root directory with the following content:

..

Step 4: Save the file.

Save the file and close it. Then restart the Apache service to implement the changes.

pip install python3

apt-get install perl

Step 7: If you want to use perl supportinstall, you will need to create a file called “perl.conf” in your home directory and add the following line to it:

Perl_Config_File=/etc/perl.conf

Final Words

Memcached is a high-performance, distributed memory caching technology that is open source. It is used to speed up dynamic websites. If read requests for your web application are high and writes are low, Memcached can be an excellent tool for you.