W3Schools Learner's Blog

W3Schools Programming knowledge summary website



How to Install Memcached on CentOS 7

How to Install Memcached on CentOS 7?

Installing the Memcached database in the Linux system is a very important skill to master. In general, it is the Linux Redhat red hat or the Memcached on Centos.


Memcached is a distributed high performance memory cache system, which belongs to the Nosql database, which is mainly used to solve the pressure caused by frequent access to the database, but it can be used to store any type of object. Almost all popular CMS has a plug-in or module to use memcached, and many programming languages have a memcached Library, including PHP, Perl, Ruby and Python, Memcached runs in memory. It does not need to write data to disk, so it is very fast.
Step #1 Install Memcached, Use the yum command
First, clean-up yum:
  1. yum clean all
update our packages:
  1. yum -y update
yum install Memcached :
  1. yum -y install memcached
Step #2: Configuration of the Memcached Installation
Use the following command to view information on the memcached command:
  1. memcached -h
Edit the memcached configuration information with the VIM command:
  1. vim /etc/sysconfig/memcached 
The VIM command enters the edit state and displays the following information. We can change the default configuration:
PORT=”11211″    #default port
USER=”memcached”    #
default user
MAXCONN=”1024″    #
default Maxconn
CACHESIZE=”64″    #
default CacheSize(MB)

save change and exit:
  1. :wq!
Step #3: start/stop/restart Memcached command:
  1. systemctl start memcached
  2. systemctl stop memcached
  3. systemctl restart memcached
Check the memcached status:
  1. systemctl status memcached
Set the Memcached starts at boot:
  1. systemctl enable memcached

No comments:

Post a Comment

Note: only a member of this blog may post a comment.