summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-09 08:05:32 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-09 08:05:32 +0000
commit4374c12427afa58b8315887b4a3238872750707b (patch)
treebfc8edf9445be0925afadd78274d10f46822abc3
parent4c4efce1a5c5bd468c7f186562ee4026ef29afe9 (diff)
automatic import of redisopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--redis.spec124
-rw-r--r--sources1
3 files changed, 126 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..9822e19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/redis-6.2.5.tar.gz
diff --git a/redis.spec b/redis.spec
new file mode 100644
index 0000000..8f1f55d
--- /dev/null
+++ b/redis.spec
@@ -0,0 +1,124 @@
+Name: redis
+Version:6.2.5
+Release: 1%{?dist}
+Summary:redis
+
+Group:Applications/Archiving
+License:GPL
+URL: http://redis.io
+Source0:redis-6.2.5.tar.gz
+
+BuildRequires: gcc
+Requires: bash,jemalloc
+
+%description
+redis server and client
+
+%prep
+%setup -q
+mkdir -p /usr/local/redis/conf
+mkdir -p /usr/local/redis/data
+mkdir -p /usr/local/redis/logs
+
+%build
+
+make %{?_smp_mflags}
+
+%install
+rm -rf
+
+make install PREFIX=%{buildroot}/usr/local/redis
+
+%files
+/usr/local/redis
+
+%doc
+%post
+mkdir -p /usr/local/redis/{conf,data,logs}
+
+echo "[Unit]
+Description=Redis server v6.2.5 daemon
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/local/redis/bin/redis-server /usr/local/redis/conf/redis.conf --daemonize yes
+ExecReload=/bin/kill -s HUP $MAINPID
+ExecStop=/usr/local/redis/bin/redis-cli -p 6379 shutdown
+User=root
+Group=root
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target" > /usr/lib/systemd/system/redis-server.service
+
+echo 'daemonize yes
+pidfile /var/run/redis/redis.pid
+port 6379
+tcp-backlog 511
+timeout 0
+tcp-keepalive 0
+loglevel notice
+logfile "/usr/local/redis/logs/redis.log"
+databases 16
+save 900 1
+save 300 10
+save 60 10000
+stop-writes-on-bgsave-error yes
+rdbcompression yes
+rdbchecksum yes
+dbfilename dump.rdb
+dir /usr/local/redis/data
+slave-serve-stale-data yes
+slave-read-only yes
+repl-diskless-sync no
+repl-diskless-sync-delay 5
+repl-disable-tcp-nodelay no
+slave-priority 100
+appendonly no
+appendfilename "appendonly.aof"
+appendfsync everysec
+no-appendfsync-on-rewrite no
+auto-aof-rewrite-percentage 100
+auto-aof-rewrite-min-size 64mb
+aof-load-truncated yes
+lua-time-limit 5000
+slowlog-log-slower-than 10000
+slowlog-max-len 128
+latency-monitor-threshold 0
+notify-keyspace-events ""
+hash-max-ziplist-entries 512
+hash-max-ziplist-value 64
+list-max-ziplist-entries 512
+list-max-ziplist-value 64
+set-max-intset-entries 512
+zset-max-ziplist-entries 128
+zset-max-ziplist-value 64
+hll-sparse-max-bytes 3000
+activerehashing yes
+client-output-buffer-limit normal 0 0 0
+client-output-buffer-limit slave 256mb 64mb 60
+client-output-buffer-limit pubsub 32mb 8mb 60
+hz 10
+aof-rewrite-incremental-fsync yes
+bind 127.0.0.1
+appendonly yes
+appendfsync no
+auto-aof-rewrite-percentage 100
+auto-aof-rewrite-min-size 64mb
+' > /usr/local/redis/conf/redis.conf
+
+chown -R root:root /usr/local/redis
+systemctl daemon-reload
+systemctl start redis-server.service > /dev/null 2>&1
+systemctl enable redis-server.service > /dev/null 2>&1
+
+%changelog
+%clean
+%preun
+#/usr/local/redis/bin/redis-cli shutdown
+
+%postun
+rm -rf /usr/local/redis
+rm -rf /etc/systemd/system/multi-user.target.wants/redis-server.service
+rm -rf /usr/lib/systemd/system/redis-server.service
diff --git a/sources b/sources
new file mode 100644
index 0000000..530519b
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+db8a2b45eafbf1ead4353044fb70f581 redis-6.2.5.tar.gz