Change default server port for icinga-redis
This commit is contained in:
parent
2b4bd4dea1
commit
4612be5188
|
@ -0,0 +1,141 @@
|
|||
Author: Markus Frosch <markus.frosch@icinga.com>
|
||||
Date: Wed Nov 20 13:20:51 2019 +0100
|
||||
|
||||
Change default server port for icinga-redis
|
||||
|
||||
diff --git a/redis.conf b/redis.conf
|
||||
index d74ff98..becbb52 100644
|
||||
--- a/redis.conf
|
||||
+++ b/redis.conf
|
||||
@@ -89,7 +89,7 @@ protected-mode yes
|
||||
|
||||
# Accept connections on the specified port, default is 6379 (IANA #815344).
|
||||
# If port 0 is specified Redis will not listen on a TCP socket.
|
||||
-port 6379
|
||||
+port 6380
|
||||
|
||||
# TCP listen() backlog.
|
||||
#
|
||||
@@ -155,7 +155,7 @@ supervised no
|
||||
#
|
||||
# Creating a pid file is best effort: if Redis is not able to create it
|
||||
# nothing bad happens, the server will start and run normally.
|
||||
-pidfile /var/run/redis_6379.pid
|
||||
+pidfile /var/run/redis_6380.pid
|
||||
|
||||
# Specify the server verbosity level.
|
||||
# This can be one of:
|
||||
diff --git a/sentinel.conf b/sentinel.conf
|
||||
index bc9a705..e738713 100644
|
||||
--- a/sentinel.conf
|
||||
+++ b/sentinel.conf
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
# port <sentinel-port>
|
||||
# The port that this sentinel instance will run on
|
||||
-port 26379
|
||||
+port 26380
|
||||
|
||||
# By default Redis Sentinel does not run as a daemon. Use 'yes' if you need it.
|
||||
# Note that Redis will write a pid file in /var/run/redis-sentinel.pid when
|
||||
@@ -81,7 +81,7 @@ dir /tmp
|
||||
#
|
||||
# Note: master name should not include special characters or spaces.
|
||||
# The valid charset is A-z 0-9 and the three characters ".-_".
|
||||
-sentinel monitor mymaster 127.0.0.1 6379 2
|
||||
+sentinel monitor mymaster 127.0.0.1 6380 2
|
||||
|
||||
# sentinel auth-pass <master-name> <password>
|
||||
#
|
||||
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c
|
||||
index d30879d..fa8d4fe 100644
|
||||
--- a/src/redis-benchmark.c
|
||||
+++ b/src/redis-benchmark.c
|
||||
@@ -567,7 +567,7 @@ usage:
|
||||
printf(
|
||||
"Usage: redis-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests>] [-k <boolean>]\n\n"
|
||||
" -h <hostname> Server hostname (default 127.0.0.1)\n"
|
||||
-" -p <port> Server port (default 6379)\n"
|
||||
+" -p <port> Server port (default 6380)\n"
|
||||
" -s <socket> Server socket (overrides host and port)\n"
|
||||
" -a <password> Password for Redis Auth\n"
|
||||
" -c <clients> Number of parallel connections (default 50)\n"
|
||||
@@ -674,7 +674,7 @@ int main(int argc, const char **argv) {
|
||||
config.latency = NULL;
|
||||
config.clients = listCreate();
|
||||
config.hostip = "127.0.0.1";
|
||||
- config.hostport = 6379;
|
||||
+ config.hostport = 6380;
|
||||
config.hostsocket = NULL;
|
||||
config.tests = NULL;
|
||||
config.dbnum = 0;
|
||||
diff --git a/src/redis-cli.c b/src/redis-cli.c
|
||||
index f9b93e9..f112f1c 100644
|
||||
--- a/src/redis-cli.c
|
||||
+++ b/src/redis-cli.c
|
||||
@@ -1470,7 +1470,7 @@ static void usage(void) {
|
||||
"\n"
|
||||
"Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]]\n"
|
||||
" -h <hostname> Server hostname (default: 127.0.0.1).\n"
|
||||
-" -p <port> Server port (default: 6379).\n"
|
||||
+" -p <port> Server port (default: 6380).\n"
|
||||
" -s <socket> Server socket (overrides hostname and port).\n"
|
||||
" -a <password> Password to use when connecting to the server.\n"
|
||||
" You can also use the " REDIS_CLI_AUTH_ENV " environment\n"
|
||||
@@ -6999,7 +6999,7 @@ int main(int argc, char **argv) {
|
||||
int firstarg;
|
||||
|
||||
config.hostip = sdsnew("127.0.0.1");
|
||||
- config.hostport = 6379;
|
||||
+ config.hostport = 6380;
|
||||
config.hostsocket = NULL;
|
||||
config.repeat = 1;
|
||||
config.interval = 0;
|
||||
diff --git a/src/sentinel.c b/src/sentinel.c
|
||||
index adff9d4..368014e 100644
|
||||
--- a/src/sentinel.c
|
||||
+++ b/src/sentinel.c
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
extern char **environ;
|
||||
|
||||
-#define REDIS_SENTINEL_PORT 26379
|
||||
+#define REDIS_SENTINEL_PORT 26380
|
||||
|
||||
/* ======================== Sentinel global state =========================== */
|
||||
|
||||
diff --git a/src/server.c b/src/server.c
|
||||
index 7f0acaa..0301801 100644
|
||||
--- a/src/server.c
|
||||
+++ b/src/server.c
|
||||
@@ -1645,7 +1645,7 @@ void initServerConfig(void) {
|
||||
/* Replication related */
|
||||
server.masterauth = NULL;
|
||||
server.masterhost = NULL;
|
||||
- server.masterport = 6379;
|
||||
+ server.masterport = 6380;
|
||||
server.master = NULL;
|
||||
server.cached_master = NULL;
|
||||
server.master_initial_offset = -1;
|
||||
@@ -3739,7 +3739,7 @@ void usage(void) {
|
||||
fprintf(stderr," ./redis-server --test-memory <megabytes>\n\n");
|
||||
fprintf(stderr,"Examples:\n");
|
||||
fprintf(stderr," ./redis-server (run the server with default conf)\n");
|
||||
- fprintf(stderr," ./redis-server /etc/redis/6379.conf\n");
|
||||
+ fprintf(stderr," ./redis-server /etc/redis/6380.conf\n");
|
||||
fprintf(stderr," ./redis-server --port 7777\n");
|
||||
fprintf(stderr," ./redis-server --port 7777 --replicaof 127.0.0.1 8888\n");
|
||||
fprintf(stderr," ./redis-server /etc/myredis.conf --loglevel verbose\n\n");
|
||||
diff --git a/src/server.h b/src/server.h
|
||||
index aa0ec37..70d476e 100644
|
||||
--- a/src/server.h
|
||||
+++ b/src/server.h
|
||||
@@ -83,7 +83,7 @@ typedef long long mstime_t; /* millisecond time type. */
|
||||
#define CONFIG_MIN_HZ 1
|
||||
#define CONFIG_MAX_HZ 500
|
||||
#define MAX_CLIENTS_PER_CLOCK_TICK 200 /* HZ is adapted based on that. */
|
||||
-#define CONFIG_DEFAULT_SERVER_PORT 6379 /* TCP port. */
|
||||
+#define CONFIG_DEFAULT_SERVER_PORT 6380 /* TCP port. */
|
||||
#define CONFIG_DEFAULT_TCP_BACKLOG 511 /* TCP listen backlog. */
|
||||
#define CONFIG_DEFAULT_CLIENT_TIMEOUT 0 /* Default client timeout: infinite */
|
||||
#define CONFIG_DEFAULT_DBNUM 16
|
|
@ -23,7 +23,7 @@ SOCK=`awk '/^[[:blank:]]*unixsocket\s/ { print $2 }' $CONFIG_FILE | tail -n1`
|
|||
# Just in case, use default host, port
|
||||
HOST=${HOST:-127.0.0.1}
|
||||
if [ "$SERVICE_NAME" = redis ]; then
|
||||
PORT=${PORT:-6379}
|
||||
PORT=${PORT:-6380}
|
||||
else
|
||||
PORT=${PORT:-26739}
|
||||
fi
|
||||
|
|
|
@ -52,6 +52,9 @@ Source9: macros.%{src_name}
|
|||
Patch0001: 0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch
|
||||
# https://github.com/antirez/redis/pull/3494 - symlink
|
||||
Patch0002: 0002-install-redis-check-rdb-as-a-symlink-instead-of-dupl.patch
|
||||
# Update default port from 6370 to 6380
|
||||
Patch0901: icinga-server-port.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
%if 0%{?with_tests}
|
||||
BuildRequires: procps-ng
|
||||
|
@ -129,6 +132,7 @@ You can use Redis from most programming languages also.
|
|||
# mv ../%%{name}-doc-%%{doc_commit} doc
|
||||
%patch0001 -p1
|
||||
%patch0002 -p1
|
||||
%patch0901 -p1
|
||||
|
||||
mv deps/lua/COPYRIGHT COPYRIGHT-lua
|
||||
mv deps/hiredis/COPYING COPYING-hiredis
|
||||
|
|
Loading…
Reference in New Issue