2018-09-04  83 views 评论

开发者经验:微擎配置阿里云redis

 标签:

 

使用阿里云的redis需要注意,需要和服务器所在同一个区域。

需要修改微擎的配置

然后编辑 /data/config.php 35行左右 查找如下代码

$config['setting']['cache'] = 'mysql';

把 mysql 改为 redis

 

(阿里云),配置文件的密码处requirepass需要增加一条auth,否则人人商城等模块会打不开;

在/data/config.php中配置如下代码:

// -------------------------- CONFIG REDIS --------------------------- //
$config['setting']['redis']['server'] = 'xxxxx.redis.aliyun.com';//如果redis服务器在别的机器,请填写机器的IP地址。
$config['setting']['redis']['port'] = 6379;
$config['setting']['redis']['pconnect'] = 0;
$config['setting']['redis']['timeout'] = 1;
$config['setting']['redis']['requirepass'] = 'redis密码';
$config['setting']['redis']['auth'] = 'redis密码';

给我留言

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: