kibana 和ES安装配置常见问题解决

1、下载相同版本的kibana和ES:

es5.6.5下载地址:https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.5.tar.gz
kibana5.6.5下载地址:https://artifacts.elastic.co/downloads/kibana/kibana-5.6.5-linux-x86_64.tar.gz

2.让Elasticsearch在系统启动时启动:
$ sudo systemctl enable elasticsearch

3后台运行:

nohup./bin/elasticsearch&

4、安装JDK 1.8.0以上版本
5.  ElasticSearch 安装时会出现 Exception in thread "main" java.lang.RuntimeException: don't run elasticsearch as root.
     解决方法:
       因为安全问题elasticsearch 不让用root用户直接运行,所以要创建新用户
       第一步:liunx创建新用户  adduser XXX    然后给创建的用户加密码 passwd XXX    输入两次密码。
       第二步:切换刚才创建的用户 su XXX  然后执行elasticsearch  会显示Permission denied 权限不足。
       第三步:给新建的XXX赋权限,chmod 777 *  这个不行,因为这个用户本身就没有权限,肯定自己不能给自己付权限。所以要用root用户登录付权限。
       第四步:root给XXX赋权限,chown -R XXX /你的elasticsearch安装目录。
6. ElasticSearch 运行${ES_HOME}/bin/elasticsearch后,根据IP:9200就是访问不了。 此时修改:elasticsearch.yaml文件
       network.host: 0.0.0.0

7.bootstrap checks failed
max file descriptors [8192] for elasticsearch process is too low, increase to at least [65536]
max size virtual memory [52729364480] for user [elastic] is too low, increase to [unlimited]
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
解决:
root 登陆

/etc/security/limits.conf
* hard nofile 65536
* soft nofile 65536

* hard nproc 2048

* soft nproc 2048

* hard memlock unlimited
* soft memlock unlimited
*  - as unlimited

/etc/sysctl.conf

fs.file-max = 2097152
vm.max_map_count = 262144
vm.swappiness = 1

执行命令:
sysctl -p

原文地址:https://www.cnblogs.com/anyun/p/8361006.html