elasticsearch+kibana环境安装

2020-04-04  本文已影响0人  whustle

安装jdk

tar -zxvf /var/jdk/jdk-8u221-linux-x64.tar.gz -C /usr
export JAVA_HOME=/usr/jdk1.8.0_221
export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/
export PATH=$PATH:$JAVA_HOME/bin
source /etc/profile
java -version

安装elasticsearch

tar -zxvf /var/es/elasticsearch-7.3.0-linux-x86_64.tar.gz -C /usr
cd /usr/elasticsearch-7.3.0/config
vi jvm.options
  -Xms1g
  -Xmx1g
network.host: 主机IP
http.port: 9200
cd ../bin
./elasticsearch
groupadd 组名
useradd 用户名 -g 组名 -p 密码
chown -R 用户名:组名 /usr/elasticsearch-7.3.0

注:在root用户下操作

su 用户名
./elasticsearch

再次报错三个错误,错误信息如下

ERROR: [3] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
[3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
vi /etc/security/limits.conf
  * soft nofile 65536
  * hard nofile 131072
  * soft nproc 2048
  * hard nproc 4096
vi /etc/sysctl.conf
  vm.max_map_count=655360

sysctl -p
node.name: node-1
cluster.initial_master_nodes: ["node-1"]
reboot
  1. 9200端口:es节点与外部通讯使用
  2. 9300端口: es节点之间通讯使用

安装kibana

server.port: 5601
server.host: 主机IP
elasticsearch.url: "http://主机IP:9200"
cd bin
./kibana --allow-root
上一篇 下一篇

猜你喜欢

热点阅读