Windows下Magento企业版如何配置Redis存储缓存

本文介绍如何在Windows上安装及运行Redis,并详细说明了如何配置Magento的local.xml文件来使用Redis作为缓存后端。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1,Redis在windows上面的安装和运行

1)

- 官方网站:http://redis.io/

- 官方下载:http://redis.io/download 可以根据需要下载不同版本

- windows版:https://github.com/mythz/redis-windows

2)启动Redis

用命令行的形式进入redis的解码包,比如:C:\xampp\redis

然后敲入命令:

redis-server.exe redis.windows.conf

注意:就会看到启动画面,这个窗口要保持开启 关闭时redis服务会自动关闭


2,修改Maggento的配置文件:app/etc/local.xml

<global>
...	
        <cache>
            <backend>Cm_Cache_Backend_Redis</backend>
            <backend_options>
                <server>172.17.78.143</server>
                <port>6379</port>
                <persistent>0</persistent>
                <database>0</database>
                <password></password>
                <force_standalone>1</force_standalone>
                <connect_retries>1</connect_retries>
                <read_timeout>5</read_timeout>
                <automatic_cleaning_factor>0</automatic_cleaning_factor>
                <compress_data>1</compress_data>
                <compress_tags>1</compress_tags>
                <compress_threshold>20480</compress_threshold>
                <compression_lib>gzip</compression_lib>
                <use_lua>0</use_lua>
            </backend_options>
        </cache>
        <full_page_cache>
            <backend>Cm_Cache_Backend_Redis</backend>
            <backend_options>
                <server>172.17.78.143</server>
                <port>6379</port>
                <persistent>0</persistent>
                <database>1</database>
                <password></password>
                <force_standalone>1</force_standalone>
                <connect_retries>1</connect_retries>
                <lifetimelimit>21600</lifetimelimit>
                <compress_data>0</compress_data>
            </backend_options>
        </full_page_cache>
		
    </global>

注意:上面的IP是你本地的IP,可以通过命令行:ipconfig 查看


重启apache就可以了。


本人在Magento1.14版本亲测可以运行

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值