一、Elasticsearch安装成windows服务

我的es所在路径为:D:\ELK5.5.0\elasticsearch-5.5.0

Java 安装目录为:C:\Program Files\Java\

1. 设置HAVA_HOME环境变量

ELK安装成windows服务-LMLPHP

2. cmd以管理员身份打开命令窗口

cd D:\ELK5.5.0\elasticsearch-5.5.0\bin

elasticsearch-service install

ELK安装成windows服务-LMLPHP

services.msc查看服务设为自动启动

ELK安装成windows服务-LMLPHP

二、把kibana安装成windows服务

CD D:\ELK5.5.0\nssm-2.24\win64
NSSM install Kibana5.5.0 D:\ELK5.5.0\kibana-5.5.0-windows-x86\bin\kibana.bat
NSSM set Kibana5.5.0 AppDirectory D:\ELK5.5.0\kibana-5.5.0-windows-x86
NSSM set Kibana5.5.0 AppEnvironmentExtra "Java_HOME=C:\Program Files\Java\jdk1.8.0_101"
NSSM set Kibana5.5.0 AppStdout D:\ELK5.5.0\nssm-2.24\stdout.log
NSSM set Kibana5.5.0 AppStderr D:\ELK5.5.0\nssm-2.24\stderr.log
NSSM set Kibana5.5.0 stash AppStdoutCreationDisposition 2
NSSM set Kibana5.5.0 AppStderrCreationDisposition 2
NSSM set Kibana5.5.0 AppStopMethodSkip 6
net start Kibana5.5.0

ELK安装成windows服务-LMLPHP

ELK安装成windows服务-LMLPHP

三、windows下安装logstash5.5.0

CD D:\ELK5.5.0\nssm-2.24\win64
NSSM install Logstash5.5.0 D:\ELK5.5.0\logstash-5.5.0\bin\logstash.bat
NSSM set Logstash5.5.0 AppParameters agent --config D:\ELK5.5.0\logstash-5.5.0\config\logstash.conf
NSSM set Logstash5.5.0 AppDirectory D:\ELK5.5.0\logstash-5.5.0
NSSM set Logstash5.5.0 AppEnvironmentExtra "Java_HOME=C:\Program Files\Java\jdk1.8.0_101"
NSSM set Logstash5.5.0 AppStdout D:\ELK5.5.0\nssm-2.24\logstash_stdout.log
NSSM set Logstash5.5.0 AppStderr D:\ELK5.5.0\nssm-2.24\logstash_stderr.log
NSSM set Logstash5.5.0 stash AppStdoutCreationDisposition 2
NSSM set Logstash5.5.0 AppStderrCreationDisposition 2
NSSM set Logstash5.5.0 AppStopMethodSkip 6
net start Logstash5.5.0

ELK安装成windows服务-LMLPHP

05-11 20:13