insert into system_config(config_key,config_value,info,status,order_id) values('redis.migrate.tool.home','/opt/cachecloud/redis-migrate-tool/','redis-migrate-tool安装路径',1,18);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.user.login.type','1','用户登录状态保存方式(session或cookie)',1,19);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.cookie.domain','','cookie登录方式所需要的域名',1,20);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.base.dir','/opt','cachecloud根目录,要和cachecloud-init.sh脚本中的目录一致',1,21);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.app.client.conn.threshold','2000','应用连接数报警阀值',1,22);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.email.alert.interface','','邮件报警接口(说明:http://cachecloud.github.io 邮件和短信报警接口规范)',1,23);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.mobile.alert.interface','','短信报警接口(说明:http://cachecloud.github.io 邮件和短信报警接口规范)',1,24);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.ldap.url','','LDAP接口地址(例如:ldap://ldap.xx.com)',1,25);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.whether.schedule.clean.data','false','是否定期清理统计数据',1,26);
insert into system_config(config_key,config_value,info,status,order_id) values('cachecloud.app.secret.base.key','cachecloud-2014','appkey秘钥基准key',1,27);
2.数据迁移工具
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CREATE TABLE `app_data_migrate_status` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增id',
`migrate_machine_ip` varchar(255) NOT NULL COMMENT '迁移工具所在机器ip',
`migrate_machine_port` int NOT NULL COMMENT '迁移工具所占port',
`source_migrate_type` tinyint(4) NOT NULL COMMENT '源迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`source_servers` varchar(2048) NOT NULL COMMENT '源实例列表',
`target_migrate_type` tinyint(4) NOT NULL COMMENT '目标迁移类型,0:single,1:redis cluster,2:rdb file,3:twemproxy',
`target_servers` varchar(2048) NOT NULL COMMENT '目标实例列表',
`source_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '源应用id',
`target_app_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '目标应用id',
`user_id` bigint(20) NOT NULL COMMENT '操作人',
`status` tinyint(4) NOT NULL COMMENT '迁移执行状态,0:开始,1:结束,2:异常',
`start_time` datetime NOT NULL COMMENT '迁移开始执行时间',
insert into instance_config(config_key,config_value,info,update_time, type, status) values('cluster-enabled','yes','是否开启集群模式',now(),2,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('cluster-node-timeout','15000','集群节点超时时间,默认15秒',now(),2,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('cluster-slave-validity-factor','10','从节点延迟有效性判断因子,默认10秒',now(),2,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('cluster-migration-barrier','1','主从迁移至少需要的从节点数,默认1个',now(),2,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('cluster-config-file','nodes-%d.conf','集群配置文件名称,格式:nodes-{port}.conf',now(),2,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('cluster-require-full-coverage','no','节点部分失败期间,其他节点是否继续工作',now(),2,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('port','%d','sentinel实例端口',now(),5,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('dir','%s','工作目录',now(),5,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('sentinel monitor','%s %s %d 1','master名称定义和最少参与监控的sentinel数,格式:masterName ip port num',now(),5,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('sentinel down-after-milliseconds','%s 20000','Sentinel判定服务器断线的毫秒数',now(),5,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('sentinel failover-timeout','%s 180000','故障迁移超时时间,默认:3分钟',now(),5,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('sentinel parallel-syncs','%s 1','在执行故障转移时,最多有多少个从服务器同时对新的主服务器进行同步,默认:1',now(),5,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('daemonize','no','是否守护进程',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('tcp-backlog','511','TCP连接完成队列',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('timeout','0','客户端闲置多少秒后关闭连接,默认为0,永不关闭',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('tcp-keepalive','60','检测客户端是否健康周期,默认关闭',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('loglevel','notice','日志级别',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('databases','16','可用的数据库数,默认值为16个,默认数据库为0',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('dir','%s','redis工作目录',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('stop-writes-on-bgsave-error','no','bgsave出错了不停写',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('repl-timeout','60','master批量数据传输时间或者ping回复时间间隔,默认:60秒',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('repl-ping-slave-period','10','指定slave定期ping master的周期,默认:10秒',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('repl-disable-tcp-nodelay','no','是否禁用socket的NO_DELAY,默认关闭,影响主从延迟',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('repl-backlog-size','10M','复制缓存区,默认:1mb,配置为:10Mb',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('repl-backlog-ttl','7200','master在没有Slave的情况下释放BACKLOG的时间多久:默认:3600,配置为:7200',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('slave-serve-stale-data','yes','当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置“yes”,slave服务器可以继续接受客户端的请求',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('slave-read-only','yes','slave服务器节点是否只读,cluster的slave节点默认读写都不可用,需要调用readonly开启可读模式',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('slave-priority','100','slave的优先级,影响sentinel/cluster晋升master操作,0永远不晋升',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('lua-time-limit','5000','Lua脚本最长的执行时间,单位为毫秒',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('slowlog-log-slower-than','10000','慢查询被记录的阀值,默认10毫秒',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('slowlog-max-len','128','最多记录慢查询的条数',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('hash-max-ziplist-entries','512','hash数据结构优化参数',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('hash-max-ziplist-value','64','hash数据结构优化参数',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('list-max-ziplist-entries','512','list数据结构优化参数',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('list-max-ziplist-value','64','list数据结构优化参数',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('set-max-intset-entries','512','set数据结构优化参数',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('zset-max-ziplist-entries','128','zset数据结构优化参数',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('zset-max-ziplist-value','64','zset数据结构优化参数',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('activerehashing','yes','是否激活重置哈希,默认:yes',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('client-output-buffer-limit normal','0 0 0','客户端输出缓冲区限制(客户端)',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('client-output-buffer-limit slave','512mb 128mb 60','客户端输出缓冲区限制(复制)',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('client-output-buffer-limit pubsub','32mb 8mb 60','客户端输出缓冲区限制(发布订阅)',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('hz','10','执行后台task数量,默认:10',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('port','%d','端口',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('maxmemory','%dmb','当前实例最大可用内存',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('maxmemory-policy','volatile-lru','内存不够时,淘汰策略,默认:volatile-lru',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('appendonly','yes','开启append only持久化模式',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('appendfsync','everysec','默认:aof每秒同步一次',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('appendfilename','appendonly-%d.aof','aof文件名称,默认:appendonly-{port}.aof',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('dbfilename','dump-%d.rdb','RDB文件默认名称,默认dump-{port}.rdb',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('aof-rewrite-incremental-fsync','yes','aof rewrite过程中,是否采取增量文件同步策略,默认:yes',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('no-appendfsync-on-rewrite','yes','是否在后台aof文件rewrite期间调用fsync,默认调用,修改为yes,防止可能fsync阻塞,但可能丢失rewrite期间的数据',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('auto-aof-rewrite-min-size','64m','触发rewrite的aof文件最小阀值,默认64m',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('auto-aof-rewrite-percentage','%d','Redis重写aof文件的比例条件,默认从100开始,统一机器下不同实例按4%递减',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('rdbcompression','yes','rdb是否压缩',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('rdbchecksum','yes','rdb校验和',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('repl-diskless-sync','no','开启无盘复制',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('repl-diskless-sync-delay','5','无盘复制延时',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('save 900','1','900秒有一次修改做bgsave',now(),6,0);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('save 300','10','300秒有10次修改做bgsave',now(),6,0);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('save 60','10000','60秒有10000次修改做bgsave',now(),6,0);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('maxclients','10000','客户端最大连接数',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('hll-sparse-max-bytes','3000','HyperLogLog稀疏表示限制设置 ',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('min-slaves-to-write','0','当slave数量小于min-slaves-to-write,且延迟小于等于min-slaves-max-lag时, master停止写入操作',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('min-slaves-max-lag','10','当slave服务器和master服务器失去连接后,或者当数据正在复制传输的时候,如果此参数值设置yes,slave服务器可以继续接受客户端的请求',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('aof-load-truncated','yes','加载aof文件时,是否忽略aof文件不完整的情况,是否Redis正常启动',now(),6,1);
insert into instance_config(config_key,config_value,info,update_time, type, status) values('notify-keyspace-events','','keyspace事件通知功能',now(),6,1);