欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  网络运营

在Linux服务器上安装 memcached的基本操作

程序员文章站 2022-07-11 15:57:39
一、memcached的安装 1、下载 memcached-1.4.33.tar.gz、libevent-2.0.22-stable.tar.gz   安装 memca...

一、memcached的安装

1、下载 memcached-1.4.33.tar.gz、libevent-2.0.22-stable.tar.gz

  安装 memcached 依赖 libevent

2、安装 libevent

a、解压 [root@iz28b4kreuaz webserver]# tar zxvf libevent-2.0.22-stable.tar.gz

b、安装在 /usr/local/下

进入解压目录下:[root@iz28b4kreuaz libevent-2.0.22-stable]# ./configure --prefix=/usr/local/libevent

c、编译并安装 [root@iz28b4kreuaz libevent-2.0.22-stable]# make && make install

3、安装memcached

a、解压 [root@iz28b4kreuaz webserver]# tar zxvf memcached-1.4.33.tar.gz

b、安装在 /usr/local/下

  进入解压目录下 [root@iz28b4kreuaz memcached-1.4.33]# ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent

c、编译并安装 [root@iz28b4kreuaz memcached-1.4.33]# make && make install

d、查看安装目录

在Linux服务器上安装 memcached的基本操作

表示安装成功。

二、memcached基本操作

1、启动 memcached

[root@iz28b4kreuaz memcached]# bin/memcached -d -u root -p 11211 -c 1024

-d:memcached作为后台进程运行

-u: 指定当前是root用户

-p:指定端口 11211 是memcached的默认端口号

-c:最大支持的连接数

以上所述是小编给大家介绍的在linux服务器上安装 memcached的基本操作,希望对大家有所帮助