🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## **一、案例中心案例设置** 打开宝塔面板,软件管理,安装Redis并启用 ![](https://img.kancloud.cn/7b/19/7b19cc9ba5aba445df26c8a58c667ae2_1324x532.png) ## **二、PHP设置中安装redis扩展** 要在你微擎站点使用的对应PHP版本里的安装扩展 ![](https://img.kancloud.cn/01/09/01098a598479cc5de18824b5b0345b97_1308x526.png) ![](https://img.kancloud.cn/51/8c/518ca74b858fcfaba6adda3541840f85_627x563.png) ## **三、修改微擎配置文件** 文件-你的微擎安装目录-data-config.php ![](https://img.kancloud.cn/c4/b7/c4b7c2ee1627a8d102d830b6bf2df948_788x369.png) ![](https://img.kancloud.cn/f5/2d/f52d7e6fd626d30a67f3b90b00a3369d_518x190.png) ![](https://img.kancloud.cn/14/23/142349af97dde0f3ceb9180688af67c3_1057x514.png) > 代码如下,如config.php中没有此代码,复制粘贴即可 ~~~ // -------------------------- CONFIG REDIS --------------------------- // $config['setting']['redis']['server']='127.0.0.1'; $config['setting']['redis']['port']=6379; $config['setting']['redis']['pconnect']=0; $config['setting']['redis']['requirepass']=''; $config['setting']['redis']['timeout']=1; ~~~