Home » Centos/RHEL » Install Memcached Server on RHEL/Centos

Install Memcached Server on RHEL/Centos

memcached is a high-performance, distributed memory object caching server, that allows us to get better and speeding up performance of dynamic web applications through caching data and objects in Memory. Memcached Server is also used to cache complete database tables and queries to advance performance of database.
Through this article you will learn to install Memcached Server on RHEL/CentOS

#yum install memcached
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.sonn.com
Excluding Packages in global exclude list
Finished
Setting up Install Process
Resolving Dependencies
–>; Running transaction check
—>; Package memcached.x86_64 0:1.4.5-1.el5 set to be updated
–>; Finished Dependency Resolution
Dependencies Resolved

================================================================================================
Package          Arch                      Version             Repository             Size
================================================================================================
memcached   x86_64           1.4.5-1.el5              epel                 72 k

Transaction Summary
================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 72 k
Is this ok [y/N]: y
Downloading Packages:
memcached-1.4.5-1.el5.x86_64.rpm                                                                               |  72 kB     00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing     : memcached                                                                                                      1/1
Installed:
memcached.x86_64 0:1.4.5-1.el5
Complete!

# vi /etc/sysconfig/memcached

Sample outputs:

PORT=”11211″
USER=”memcached”
MAXCONN=”1024″
CACHESIZE=”64″
OPTIONS=””

How do I start / stop / restart Memcached server

#service memcached start
#service memcached stop
#service memcached restart
#service memcached status

Perform thefollowing command to see if memcached is running or not:

# pgrep memcached
# netstat -tulpn | grep :11211
tcp 0 0 0.0.0.0:11211 0.0.0.0:* LISTEN 8974/memcached
udp 0 0 0.0.0.0:11211 0.0.0.0:* 8974/memcached

memcached-tool to get general stats about the server:

#memcached-tool xx.xx.xx.xx stats

That’s it Enjoy!

About

I am founder and webmaster of www.linuxpcfix.com and working as a Sr. Linux Administrator (Expertise on Linux/Unix & Cloud Server) and have been in the industry from last 7 years.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Time limit is exhausted. Please reload the CAPTCHA.

Categorized Tag Cloud