Init, konfigurasi yang dijalankan ketika kondisi tertentu. Misalnya ketika server tiap kali hidup.
- $ cd /etc/init
- $ sudo nano elasticsearch.conf
Isinya kira-kira seperti ini :
start on started networking
stop on runlevel [!2345]
env APPUSER="mentul"
env APPDIR="/opt/elasticsearch-1.7.2/bin/"
env APPBIN="elasticsearch"
env APPCONF="/opt/elasticsearch-1.7.2/config/elasticsearch.yml"
respawn
exec sudo -u $APPUSER $APPDIR/$APPBIN $APPCONF - $ sudo nano logstash.conf
start on started networking
stop on runlevel [!2345]
env APPUSER="elog"
env APPDIR="/opt/logstash-1.5.4/bin/"
env APPBIN="logstash"
respawn
exec sudo -u $APPUSER $APPDIR/$APPBIN agent -f /opt/logstash-1.5.4/logstash.conf - $ sudo nano kibana.conf
start on started networking
stop on runlevel [!2345]
respawn
exec sudo -u gembos /opt/kibana-4.1.2-linux-x64/bin/kibana /opt/kibana-4.1.2-linux-x64/config/kibana.yml - Save dan coba direboot servernya
Komentar
Posting Komentar