systemd-redis_server.service 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # example systemd service unit file for redis-server
  2. #
  3. # In order to use this as a template for providing a redis service in your
  4. # environment, _at the very least_ make sure to adapt the redis configuration
  5. # file you intend to use as needed (make sure to set "supervised systemd"), and
  6. # to set sane TimeoutStartSec and TimeoutStopSec property values in the unit's
  7. # "[Service]" section to fit your needs.
  8. #
  9. # Some properties, such as User= and Group=, are highly desirable for virtually
  10. # all deployments of redis, but cannot be provided in a manner that fits all
  11. # expectable environments. Some of these properties have been commented out in
  12. # this example service unit file, but you are highly encouraged to set them to
  13. # fit your needs.
  14. #
  15. # Please refer to systemd.unit(5), systemd.service(5), and systemd.exec(5) for
  16. # more information.
  17. [Unit]
  18. Description=Redis data structure server
  19. Documentation=https://redis.io/documentation
  20. #Before=your_application.service another_example_application.service
  21. #AssertPathExists=/var/lib/redis
  22. [Service]
  23. ExecStart=/usr/local/bin/redis-server --supervised systemd --daemonize no
  24. ## Alternatively, have redis-server load a configuration file:
  25. #ExecStart=/usr/local/bin/redis-server /path/to/your/redis.conf
  26. LimitNOFILE=10032
  27. NoNewPrivileges=yes
  28. #OOMScoreAdjust=-900
  29. #PrivateTmp=yes
  30. Type=notify
  31. TimeoutStartSec=infinity
  32. TimeoutStopSec=infinity
  33. UMask=0077
  34. #User=redis
  35. #Group=redis
  36. #WorkingDirectory=/var/lib/redis
  37. [Install]
  38. WantedBy=multi-user.target