How to install Memcached in CentOS 6

Install the following packages:

  • memcached High Performance, Distributed Memory Object Cache server package.
  • python-memcached Python client to work with memcached server.

 

Type the following yum command to install.

yum install memcached python-memcached

 

How do I configure Memcached server?

# vi /etc/sysconfig/memcached

 

How do I start/stop/restart Memcached server?

# /sbin/service memcached start
# /sbin/service memcached stop
# /sbin/service memcached restart
# /sbin/service memcached status

 

How do I verify that Memcached is running and working correctly on Linux?

Type the following command to see if it is running or not:

# pgrep memcached
# netstat -tulpn | grep :11211

 

Use the memcached-tool to get general stats about the server:

# memcached-tool 127.0.0.1:11211 stats

How to install Memcached in CentOS 6

上一篇:SQL中以count或sum为条件的查询方式


下一篇:VISUAL STUDIO 2005连接MYSQL数据库