如何:在XAMPP(Windows 7/8/10)上安装Memcache [英] HOW TO: Install Memcache on XAMPP (Windows 7/8/10)

查看:190
本文介绍了如何:在XAMPP(Windows 7/8/10)上安装Memcache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个关于Laravel的项目.我正在尝试制作一个简单的系统,该系统使用专注于memcache的缓存.当我开始学习时,我首先检查了Laravel网站,然后发现使用Memcached缓存需要安装Memcached PECL软件包.

I am doing a project on Laravel. I'm trying to make a simple system that uses cache focused on memcache. When I started studying, I checked Laravel site first and then I found that using the Memcached cache requires the Memcached PECL package to be installed.

我搜索了它,在安装过程中遇到了一些问题.

I searched through it and I got some problems during installation.

如何安装memcache?

推荐答案

以下是安装内存缓存时应遵循的步骤.

Here are the steps that should be followed when you install memcache.

  1. 启动您的xampp.
  2. 单击配置"并打开php.ini文件.

搜索

;extension=php_memcache.dll

如果找不到,请添加

extension=php_memcache.dll
[Memcache]
memcache.allow_failover = 1
memcache.max_failover_attempts=20
memcache.chunk_size =8192
memcache.default_port = 11211

3.从php_memecache.dll rel ="noreferrer"> windows.php.net (请确保检查您的php版本和php_memcache.dll是否相同.否则,将出现错误.)

3. download the file php_memecache.dll from windows.php.net (make sure to check your php version and php_memcache.dll are same. Otherwise, it will through error.)

将其解压缩并将'.dll'文件粘贴到路径 xampp \ php \ ext 中,在我的情况下,它是 F:\ xampp \ php \ ext (我必须将文件重命名为 memcache.dll ,但是当您在其他网站上描述了此操作的步骤时,他们并没有告诉您重命名,但是我有在我的项目中完成了此操作!).

unzip it and paste '.dll' file in the path xampp\php\ext, in my case it is F:\xampp\php\ext (I had to rename the file to memcache.dll but when you take a look on other sites that describes the steps for this, they don't tell to rename, but I have done this in my project!).

  1. 下载并安装Windows Memcache服务器

Memcache.exe >果冻糖

Download the Memcache.exe from jellycan

下载完成后,将 memcache.exe 文件解压缩并将其放入您选择的任何所需目录中(例如C:/memcached/).确保文件夹名称应为 memcached

After completion of download, unzip and put the memcache.exe file into any desired directory of your choice (e.g. C:/memcached/). make sure folder name should be memcached

  1. 使用以管理员身份运行" 打开 cmd提示,并执行安装行
  1. Open the cmd prompt with "Run as Administrator" and execute the line to install

c:/memcached/memcached.exe -d install

然后输入

net start "memcached server"

如果您已经安装了memcache.然后只需通过行net start "memcached server".

In case you get memcache is already installed. then just go through line net start "memcached server".

出于安装目的,您可以转到复制 memcache.exe 的路径.并双击该文件,安装了内存缓存,现在只需添加net start "memcached server"行,即可启用您的内存缓存.

For the installation purpose you can go to the path where you have copied the memcache.exe. and double click to the file, memcache is installed, now just add line net start "memcached server" and your memcache is enabled.

  1. 重新启动Xampp Apache

  1. Restart Xampp Apache

重新启动Memcached:

Restart Memcached:

C:\Windows\system32> net start memcached

memcached服务正在启动. memcached服务已成功启动.

The memcached service is starting. The memcached service was started successfully.

C:\Windows\system32> net stop memcached

memcached服务正在停止. memcached服务已成功停止.

The memcached service is stopping. The memcached service was stopped successfully.

这篇关于如何:在XAMPP(Windows 7/8/10)上安装Memcache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆