在head目录中执行
[root@1inux elasticsearch-head]# npm install
启动:
[root@1inux elasticsearch-head]# grunt server
2、安装kibana
[root@1inux elk]# tar -zxvf kibana-5.6.3-linux-x86_64.tar.gz
解压后编辑配置文件;
[root@1inux bin]# vim ../config/kibana.yml //修改为 elasticsearch 的访问地址及端口如下
#server.host: "localhost"
server.host: "192.168.159.130"
#elasticsearch.url: "http://localhost:9200"
elasticsearch.url: " 然后保存启动如下;
[root@1inux bin]# ./kibana
log [15:45:26.952] [info][status][plugin:kibana@5.6.3] Status changed from uninitialized to green - Ready
log [15:45:27.067] [info][status][plugin:elasticsearch@5.6.3] Status changed from uninitialized to yellow - Waiting for Elasticsearch
log [15:45:27.118] [info][status][plugin:console@5.6.3] Status changed from uninitialized to green - Ready
log [15:45:27.136] [info][status][plugin:metrics@5.6.3] Status changed from uninitialized to green - Ready
log [15:45:27.566] [info][status][plugin:timelion@5.6.3] Status changed from uninitialized to green - Ready
log [15:45:27.697] [info][listening] Server running at http://localhost:5601
log [15:45:27.699] [info][status][ui settings] Status changed from uninitialized to yellow - Elasticsearch plugin is yellow 3、安装 logstash-5.6.3.tar.gz
[root@1inux elk]# tar -zxvf logstash-5.6.3.tar.gz
解压后编辑配置文件,然后就可以使用了 编写文件
编辑文件 # vim /config/test.conf
input {
file {
type => "nginx_log"
path => "/var/log/nginx/access.log"
start_position => "beginning"
}
}
output {
elasticsearch {
hosts => "192.168.159.130"
index => "1inux"
}
stdout{codec => rubydebug}
}
启动:
root@1inux bin]# ./logstash -f ../config/test.conf
报错:
1、
[root@bogon elk]# ./elasticsearch-5.6.3/bin/elasticsearch
[2017-10-25T06:29:04,996][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
解决方案:使用elk用户启动
问题二、
ERROR: [4] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2]: max number of threads [1024] for user [elk] is too low, increase to at least [2048]
[3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
参考上面系统修改 问题三、
编辑elasticsearch配置文件
[4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
在 bootstrap.memory_lock 下面 添加:
bootstrap.system_call_filter: false