Skip to content

Instantly share code, notes, and snippets.

@tctony
Forked from ordoghl/redis.service
Last active July 25, 2017 07:10
Show Gist options
  • Select an option

  • Save tctony/9cdd5848390daf5a6519aed303343de3 to your computer and use it in GitHub Desktop.

Select an option

Save tctony/9cdd5848390daf5a6519aed303343de3 to your computer and use it in GitHub Desktop.
redis systemd unit file
[Unit]
Description=Redis In-Memory Data Store
After=network.target
[Service]
User=redis
Group=redis
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=100000
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
ExecStop=/usr/local/bin/redis-cli shutdown
ExecReload=/usr/local/bin/redis-cli shutdown && /usr/local/bin/redis-server /etc/redis/redis.conf
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment