Linux 安装elastic search 和kibana

es安装需要jdk环境,所以安装es之前,需要先按章jdk。之前我已经安装了jdk8,我直接安装es了。

下载地址 : https://www.elastic.co/cn/downloads/elasticsearch

安装参考连接   https://www.cnblogs.com/lizichao1991/p/7809156.html

把下载好的压缩包上传到Linux服务器。tar -zxvf 命令进行解压。

还有一点。es不能在root用户下启动,会报错,所以最好新建立一个elastic search用户。

Linux新建用户  参考连接  https://www.cnblogs.com/irisrain/p/4324593.html

linux命令   useradd  用户名

                     passwd 用户名   设置密码

创建 data和logs文件夹

可以用 mkdir /data  或者  mkdir -p es/data  命令

之后进行配置文件修改   在config文件夹下的elasticsearch.yml   

进入bin目录下  ./elasticsearch  启动   后台启动   ./elasticsearch  -d

执行curl 'http://自己配置的IP地址:9200/' 命令

或者浏览器打开,如果Linux里可以访问,浏览器访问不了,是你的Linux端口没有打开

参考   https://blog.csdn.net/Peter_S/article/details/87285527

我在部署tomcat时候遇到这个问题,那里面写了解决方案

我在启动elastic search的碰到下面几个问题,单独说下。

1,

Caused by: org.elasticsearch.ElasticsearchException: X-Pack is not supported and Machine Learning is not available for [linux-x86]; you can use the other X-Pack features (unsupported) by setting xpack.ml.enabled: false in elasticsearch.yml

参考连接  https://blog.csdn.net/fanrenxiang/article/details/81358332

在config文件夹下elasticsearch.yml新增一行       xpack.ml.enabled: false

2,

[1]: max file descriptors [1024] for elasticsearch process is too low, increase to at least [65536]

参考连接  https://blog.csdn.net/qq_33363618/article/details/78882827

切换到root用户

输入Linux 命令  vi /etc/security/limits.conf

添加如下内容:

* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096

[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

参考连接  http://www.cnblogs.com/yidiandhappy/p/7714489.html

切换到root用户  执行Linux命令   sysctl -w vm.max_map_count=262144

[3]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

参考连接  https://blog.csdn.net/qq1137623160/article/details/78341996

在elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面:
bootstrap.memory_lock: false
bootstrap.system_call_filter: false

----------------------------------------------------------------------------------------------------------------------------------------------

kibana  下载地址   https://www.elastic.co/downloads/kibana

安装参考地址   https://blog.csdn.net/cb2474600377/article/details/78963247

下载好之后上传到服务器,同样  tar -zxvf 命令进行解压。

config/kibana.yml  j进行配置

启动  ./kibana 或者  ./kibana &

./kibana &启动 需要exit退出,之后就Linux后台运行了,

我进行启动的时候发现权限不足

参考连接  https://blog.csdn.net/qq_19524879/article/details/83540840

网上查了,权限不足,安装es的时候省了一步。。。。

chown -R elasticsearch:elasticsearch /home/elasticsearch/

chown -R 用户名:密码  文件夹

浏览器 输入  http://ip:5601/

猜你喜欢

转载自blog.csdn.net/Peter_S/article/details/88060752