memcache缓存技术应用

2025-11-10 17:30:24

1、1. 安装memcache

在linux系统中安装memcache

memcache缓存技术应用

2、2.

上传软件到linux系统:

memcache缓存技术应用

1、一.安装libevent

安装libevent命令:

shell# tar zxvf libevent-2.0.21-stable.tar.gz

   shell# cd libevent-2.0.21-stable

   shell# ./configure --prefix=/usr/local/libevent

   shell# make

   shell# make install

至此libevent安装完毕;

二.安装memcache服务软件

安装memcached命令:

shell# tar zxvf memcached-1.4.25.tar.gz

   shell# cd memcached-1.4.25

    shell# ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent/

shell# make

shell# make install

   至此memcached安装完毕;

memcache缓存技术应用

2、2.

启动memcache服务

memcache缓存技术应用

1、1.

下图,在memcache解压目录里边执行phpize

php的扩展(依赖):gd、xml、pdo、mysql、memcache、redis、mb_string等等

软件本身、依赖软件的安装顺序:先依赖软件、再软件本身

目前的情况是,php软件本身已经安装完毕,但是我们还想给其安装memcache扩展,

显然,软件安装顺序出现问题。

现在技术在提高,扩展软件后安装也可以成为php的扩展功能(php不需要重复安装)

必要步骤:扩展软件安装的时候先执行一次/usr/local/php/bin/phpize

memcache缓存技术应用

2、2.

php安装memcache扩展

安装memcache-2.2.7.tar

shell# tar xvf memcache-2.2.7.tar

shell# cd memcache-2.2.7

shell# /usr/local/php/bin/phpize

shell#./configure --enable-memcache --with-php-config=/usr/local/php/bin/php-config --with-zlib-dir

shell# make && make install

memcache缓存技术应用

memcache缓存技术应用

3、3.php.ini开启memcache扩展

memcache缓存技术应用

4、4.重启apache.

memcache缓存技术应用

5、5.

给php安装memcache成功:

memcache缓存技术应用

1、1.

memcache项目中的应用代码编写。

memcache缓存技术应用

memcache缓存技术应用

memcache缓存技术应用

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
相关推荐
  • 阅读量:75
  • 阅读量:189
  • 阅读量:93
  • 阅读量:176
  • 阅读量:131
  • 猜你喜欢