Skip to content

Instantly share code, notes, and snippets.

@nexdrew
Created April 29, 2015 23:57
Show Gist options
  • Save nexdrew/14392032ed6f105474a3 to your computer and use it in GitHub Desktop.
Save nexdrew/14392032ed6f105474a3 to your computer and use it in GitHub Desktop.
Example files for running Redis on CentOS 7 (after manual install)
/var/lib/redis/logs/redis.log {
daily
rotate 14
copytruncate
delaycompress
compress
notifempty
missingok
}
[Unit]
Description=Redis Server
After=network.target
[Service]
Type=simple
PIDFile=/var/run/redis.pid
User=redis
ExecStartPre=/bin/mkdir -p /var/lib/redis/logs
ExecStart=/usr/local/bin/redis-server /etc/redis.conf
ExecStop=/bin/kill -15 $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Redis Server</short>
<description>Redis Datastore Server</description>
<port protocol="tcp" port="6379"/>
</service>
@beuel66
Copy link

beuel66 commented May 15, 2018

Is there any advice regarding the Redis daemonize option within a systemd service? The Redis Administration page simply says "Use daemonize no when run under daemontools", which is default. Does this refer to any kind of startup system or just this specific tool set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment