How to install Memcached on CentOS?

Memcached is very fast caching system for MySQL. It is a distributed, high-performance, in-memory caching system that is primarily used to speed up sites that make heavy use of databases.

Steps -

1. Firstly clean-up yum -
yum clean all

2. Update the packages -
yum -y update

3. Install memcached and it's related packages -
yum -y install memcached

Once done with installation we can proceed with the configuration -

1. You can fire below command to check the information of memcached command -
memcached -h

2. Configuration file path is as follow -
/etc/sysconfig/memcached

Memcached will start on port 11211 by default as per the default configuration file as follow -
PORT=”11211″
USER=”memcached”
MAXCONN=”1024″
CACHESIZE=”64″

If you want to edit the any value in file memcached file then follow below steps -
vi /etc/sysconfig/memcached

Update the value which you'd like to update and save the configuration file. 

3. Restart the memcached service -
service memcached restart 

4. Start the web server.  For Apache web server fire below command -
service httpd restart

5. Check the status of memcached -
service memcached status

6.  Stop memcached service -
service memcached stop

All done. Smile
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to install AVG Antivirus scanner on Ubuntu?

AVG free is antivirus which protects from spyware as well malware. It is free to use for private...

How to setup a WordPress website on plain Centos server?

The following steps have been successfully tested on a plain centos server. Now lets start...

How to change the port number of Apache Web Server?

Default port to access the Apache is 80. Secure port for communicating with world for Apache is...

How to install Postfix on CentOS?

Postfix is an open-source Mail Transport Agent (MTA), which supports protocols like LDAP, SMTP...

How to install SOAP on CentOS?

Install SOAP on CentOS 1) Fire below command - yum install php-soap Output will be as follow...

Powered by WHMCompleteSolution