discuz+redis 并发提升解决方案(500w pv版)
1.安装redis扩展 和 可视化工具2.config/config_global.php
$_config['memory']['redis']['server'] = '127.0.0.1';
$_config['memory']['redis']['port'] = 6379;
$_config['memory']['redis']['pconnect'] = 1;
$_config['memory']['redis']['timeout'] = '0';
$_config['memory']['redis']['requirepass'] = 'xmspace.net';
$_config['memory']['redis']['serializer'] = 1;
3.source/class/memory/memory_driver_redis.php
搜索:
$this->enable = $connect ? true : false;
if ($this->enable) {
改成
$this->enable = $connect ? true : false;
if ($this->enable) {
if ($config['requirepass']) {
$this->obj->auth($config['requirepass']);
}
4.性能最大优化:
**** Hidden Message *****
页:
[1]