systemd.asciidoc 962 B

123456789101112131415161718192021222324252627282930
  1. ==== Running Elasticsearch with `systemd`
  2. To configure Elasticsearch to start automatically when the system boots up,
  3. run the following commands:
  4. [source,sh]
  5. --------------------------------------------------
  6. sudo /bin/systemctl daemon-reload
  7. sudo /bin/systemctl enable elasticsearch.service
  8. --------------------------------------------------
  9. Elasticsearch can be started and stopped as follows:
  10. [source,sh]
  11. --------------------------------------------
  12. sudo systemctl start elasticsearch.service
  13. sudo systemctl stop elasticsearch.service
  14. --------------------------------------------
  15. These commands provide no feedback as to whether Elasticsearch was started
  16. successfully or not. Instead, this information will be written to the
  17. `systemd` journal, which can be tailed as follows:
  18. [source,sh]
  19. --------------------------------------------
  20. sudo journalctl -f
  21. --------------------------------------------
  22. Log files can be found in `/var/log/elasticsearch/`.