Centos7安装memcached集中式缓存系统

树叶云

Memcached 是一个高性能、分布式内存对象缓存系统,本质上是通用的,但目的是为了通过减轻数据库负载来加快动态网络应用的速度。Memcached 是一个内存键值存储,用于存储来自数据库调用、API调用或页面渲染结果的小块任意数据(字符串、对象)。

环境准备

环境:CentOS 7.4

ip:172.16.1.112

具体安装步骤

安装memcached依赖包

[root@localhost tools]# yum install -y libevent libevent-devel nc -y

将memcached包上传至服务器

[root@localhost tools]# ls
memcached-1.4.13.tar.gz

安装memcached

[root@localhost tools]# ls
memcached-1.4.13.tar.gz
[root@localhost tools]# tar xf memcached-1.4.13.tar.gz
[root@localhost tools]# ls
memcached-1.4.13  memcached-1.4.13.tar.gz
[root@localhost tools]# cd memcached-1.4.13/
[root@localhost memcached-1.4.13]# ./configure
[root@localhost memcached-1.4.13]# make
[root@localhost memcached-1.4.13]# make install

启动memcached

[root@localhost ~]# memcached -m 16 -p 33211 -d -u root -c 8192

查看结果

[root@localhost ~]# lsof -i:33211
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
memcached 6373 root   26u  IPv4  39764      0t0  TCP *:33211 (LISTEN)
memcached 6373 root   27u  IPv6  39765      0t0  TCP *:33211 (LISTEN)
memcached 6373 root   28u  IPv4  39768      0t0  UDP *:33211
memcached 6373 root   29u  IPv6  39769      0t0  UDP *:33211

文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/222688.html<

(0)
运维的头像运维
上一篇2025-04-15 14:59
下一篇 2025-04-15 15:00

相关推荐

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注