10 is mounted through the docker memcached

memcached is a high-performance memory database systems. This article describes the use of docker install memcached.

1, the search memcached

docker search memcached

2, get memcached

docker pull memcached

3, start memcached

docker run -p 11211:11211 --name memcache memcached

4, and into the test container docker

#测试是否启动成功
netstat -luntp|grep 11211
或者
docker ps
#安装telnet
yum install -y telnet
#通过telnet方式连接memcached
telnet 127.0.0.1 11211
#设置值,age是key,0是标志位,900是生命周期,8代表所占字节数,回车之后的10是value
set age 0 900 8
10
#获取值
get age
#退出
exit

To do the following:
Set and get data
At this point, we have completed the docker install memcached, and tested through telnet.

Guess you like

Origin www.cnblogs.com/alichengxuyuan/p/12581379.html