redis-server.service 522 B

1234567891011121314151617181920212223
  1. [Unit]
  2. Description=Redis In-Memory Data Store
  3. After=network.target
  4. [Service]
  5. Type=forking
  6. PIDFile=/var/run/redis/redis.pid
  7. User=redis
  8. Group=redis
  9. Environment=statedir=/var/run/redis
  10. PermissionsStartOnly=true
  11. ExecStartPre=/bin/mkdir -p ${statedir}
  12. ExecStartPre=/bin/chown -R redis:redis ${statedir}
  13. ExecStart=/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
  14. ExecStop=/bin/kill -s TERM $MAINPID
  15. Restart=always
  16. LimitNOFILE=1000000
  17. LimitNPROC=1000000
  18. LimitCORE=1000000
  19. [Install]
  20. WantedBy=multi-user.target