Accepting request 505518 from home:computersalat:devel:database
cleanup service file, add redis.sysctl file, add more info to README.SUSE OBS-URL: https://build.opensuse.org/request/show/505518 OBS-URL: https://build.opensuse.org/package/show/server:database/redis?expand=0&rev=93
This commit is contained in:
parent
46a04d4623
commit
61d79735c3
14
README.SUSE
14
README.SUSE
@ -13,13 +13,25 @@ dir /var/lib/redis/otherapp/
|
|||||||
|
|
||||||
If you want to run more than one instance you also have to change the
|
If you want to run more than one instance you also have to change the
|
||||||
socket path and/or the ip:port combination.
|
socket path and/or the ip:port combination.
|
||||||
|
e.g. /var/run/redis/otherapp.sock
|
||||||
|
|
||||||
|
If you plan to use redis in combination with apache, then you should
|
||||||
|
add 'redis' to apache group and set 'unixsocketperm 770':
|
||||||
|
$ usermod -a -G redis wwwrun
|
||||||
|
$ systemctl restart apache2
|
||||||
|
then apache is able to connect to redis socket
|
||||||
|
|
||||||
Also make sure if you copy configurations from somewhere, that "daemonize"
|
Also make sure if you copy configurations from somewhere, that "daemonize"
|
||||||
should be set to "no".
|
should be set to "no".
|
||||||
|
|
||||||
3. create the database dir:
|
3a. create the database dir:
|
||||||
$ install -d -o redis -g redis -m 0750 /var/lib/redis/otherapp/
|
$ install -d -o redis -g redis -m 0750 /var/lib/redis/otherapp/
|
||||||
|
|
||||||
|
3b. add limits (ulimit) to each service
|
||||||
|
$ install -d -m 0755 /etc/systemd/system/redis@otherapp.service.d
|
||||||
|
$ echo "[Service]
|
||||||
|
LimitNOFILE=10240" > /etc/systemd/system/redis@otherapp.service.d/limits.conf
|
||||||
|
|
||||||
4. systemctl start redis@otherapp
|
4. systemctl start redis@otherapp
|
||||||
5. systemctl enable redis@otherapp
|
5. systemctl enable redis@otherapp
|
||||||
|
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 21 16:28:36 UTC 2017 - chris@computersalat.de
|
||||||
|
|
||||||
|
- cleanup service file
|
||||||
|
- add redis.sysctl file
|
||||||
|
- update README.SUSE
|
||||||
|
* add info for socket usage per service
|
||||||
|
* add info for limits per service (LimitNOFILE=10240)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 18 12:43:42 UTC 2017 - vsistek@suse.com
|
Thu May 18 12:43:42 UTC 2017 - vsistek@suse.com
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ Source2: redis.target
|
|||||||
Source3: redis@.service
|
Source3: redis@.service
|
||||||
Source4: redis.tmpfiles.d
|
Source4: redis.tmpfiles.d
|
||||||
Source5: README.SUSE
|
Source5: README.SUSE
|
||||||
|
Source6: %{name}.sysctl
|
||||||
# PATCH-FIX-OPENSUSE -- openSUSE-style init script
|
# PATCH-FIX-OPENSUSE -- openSUSE-style init script
|
||||||
Patch0: %{name}-initscript.patch
|
Patch0: %{name}-initscript.patch
|
||||||
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
|
||||||
@ -96,6 +97,9 @@ perl -p -i -e 's|daemonize yes|daemonize no|g' redis.conf
|
|||||||
install -D -m 0640 redis.conf %{buildroot}%{_conf_dir}/default.conf.example
|
install -D -m 0640 redis.conf %{buildroot}%{_conf_dir}/default.conf.example
|
||||||
install -D -m 0640 sentinel.conf %{buildroot}%{_conf_dir}/sentinel.conf.example
|
install -D -m 0640 sentinel.conf %{buildroot}%{_conf_dir}/sentinel.conf.example
|
||||||
|
|
||||||
|
# some sysctl stuff
|
||||||
|
install -D -m 0644 %{S:6} %{buildroot}%{_sysconfdir}/sysctl.d/00-redis.conf
|
||||||
|
|
||||||
#
|
#
|
||||||
# init
|
# init
|
||||||
#
|
#
|
||||||
@ -166,6 +170,7 @@ echo " sudo rcredis start; sudo chkconfig redis on"
|
|||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING README.md
|
%doc 00-RELEASENOTES BUGS CONTRIBUTING COPYING README.md
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
|
||||||
|
%config(noreplace) %{_sysconfdir}/sysctl.d/00-redis.conf
|
||||||
%{_bindir}/redis-*
|
%{_bindir}/redis-*
|
||||||
%{_sbindir}/redis-*
|
%{_sbindir}/redis-*
|
||||||
%{_sbindir}/rc%{name}
|
%{_sbindir}/rc%{name}
|
||||||
|
12
redis.sysctl
Normal file
12
redis.sysctl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
### remove redis Warnings about
|
||||||
|
|
||||||
|
# WARNING: The TCP backlog setting of 511 cannot be enforced because
|
||||||
|
# /proc/sys/net/core/somaxconn is set to the lower value of 128.
|
||||||
|
net.core.somaxconn=512
|
||||||
|
|
||||||
|
# WARNING overcommit_memory is set to 0! Background save may fail
|
||||||
|
# under low memory condition. To fix this issue add
|
||||||
|
# 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or
|
||||||
|
# run the command 'sysctl -w vm.overcommit_memory=1' for this to take
|
||||||
|
# effect.
|
||||||
|
vm.overcommit_memory=1
|
@ -12,9 +12,5 @@ PIDFile=/var/run/redis/%i.pid
|
|||||||
ExecStart=/usr/sbin/redis-server /etc/redis/%i.conf
|
ExecStart=/usr/sbin/redis-server /etc/redis/%i.conf
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
#ExecStart=/usr/sbin/openvpn --daemon --suppress-timestamps --writepid /var/run/openvpn/%i.pid --cd /etc/openvpn/ --config %i.conf
|
|
||||||
#ExecReload=/sbin/killproc -p /var/run/openvpn/%i.pid -HUP /usr/sbin/openvpn
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target redis.target
|
WantedBy=multi-user.target redis.target
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user