2
0

systemd-redis_server.service 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. Wants=network-online.target
  23. After=network-online.target
  24. [Service]
  25. ExecStart=/usr/local/bin/redis-server --supervised systemd --daemonize no
  26. ## Alternatively, have redis-server load a configuration file:
  27. #ExecStart=/usr/local/bin/redis-server /path/to/your/redis.conf
  28. LimitNOFILE=10032
  29. NoNewPrivileges=yes
  30. #OOMScoreAdjust=-900
  31. #PrivateTmp=yes
  32. Type=notify
  33. TimeoutStartSec=infinity
  34. TimeoutStopSec=infinity
  35. UMask=0077
  36. #User=redis
  37. #Group=redis
  38. #WorkingDirectory=/var/lib/redis
  39. [Install]
  40. WantedBy=multi-user.target