Elasticsearch home directory
ES_HOME=/usr/share/elasticsearch
Elasticsearch Java path
JAVA_HOME=/opt/jdk1.8.0_141
Elasticsearch configuration directory
CONF_DIR=/etc/elasticsearch
Elasticsearch data directory
DATA_DIR=/var/lib/elasticsearch
Elasticsearch logs directory
LOG_DIR=/var/log/elasticsearch
Elasticsearch PID directory
PID_DIR=/var/run/elasticsearch
Additional Java OPTS
ES_JAVA_OPTS="${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR}"
Configure restart on package upgrade (true, every other setting will lead to not restarting)
#RESTART_ON_UPGRADE=true
===========================================================================
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2017-09-15 22:07:01 ICT; 728ms ago
Docs: http://www.elastic.co
Process: 2865 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
Process: 2864 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 2865 (code=exited, status=1/FAILURE)
hi thank you for answer new error below
Sep 15 22:07:00 localhost.localdomain systemd[1]: Starting Elasticsearch...
Sep 15 22:07:00 localhost.localdomain systemd[1]: Started Elasticsearch.
Sep 15 22:07:01 localhost.localdomain elasticsearch[2865]: Error: Could not find or load main class ${LOG_DIR}
Sep 15 22:07:01 localhost.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=...ILURE
Sep 15 22:07:01 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
Sep 15 22:07:01 localhost.localdomain systemd[1]: elasticsearch.service failed.
Hint: Some lines were ellipsized, use -l to show in full.