用法
cluster-config-file nodes-6379.conf
注意事项:
默认文件名nodes.conf,所以不修改的话,所有节点都会是这个。
每一个cluster node都要设置自己的文件名,不然第一个创建的nodes.conf会占位。
redis源码
pidfile默认路径
// path: /redis/src/server.h:115
#define CONFIG_DEFAULT_PID_FILE "/var/run/redis.pid"
8016 if (background || server.pidfile) createPidFile();
https://github.com/redis/redis/blob/6.2.6/src
331 if (ctx_config->dh_params_file) {
332 FILE *dhfile = fopen(ctx_config->dh_params_file, "r");
333 DH *dh = NULL;
334 if (!dhfile) {
335 serverLog(LL_WARNING, "Failed to load %s: %s", ctx_config->dh_params_file, strerror(errno));
336 goto error;
337 }
338
339 dh = PEM_read_DHparams(dhfile, NULL, NULL, NULL);
340 fclose(dhfile);
341 if (!dh) {
342 serverLog(LL_WARNING, "%s: failed to read DH params.", ctx_config->dh_params_file);
343 goto error;
344 }
345
346 if (SSL_CTX_set_tmp_dh(ctx, dh) <= 0) {
347 ERR_error_string_n(ERR_get_error(), errbuf, sizeof(errbuf));
348 serverLog(LL_WARNING, "Failed to load DH params file: %s: %s", ctx_config->dh_params_file, errbuf);
349 DH_free(dh);
350 goto error;
351 }
352
353 DH_free(dh);
354 }
原生注释
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /usr/local/var/run/redis.pid when daemonized.
# When Redis is supervised by upstart or systemd, this parameter has no impact.
daemonize no