elasticsearch无网环境下安装
1 文件下载
https://www.elastic.co/cn/downloads/?elektra=home&storm=hero
分别下载elasticsearch-7.12.0-linux-x86_64.tar.gz
kibana-7.12.0-linux-x86_64.tar.gz
上传到服务器 /development/ 文件夹下面
2 解压文件
[root@node1 development]# tar -zxvf elasticsearch-7.12.0-linux-x86_64.tar.gz
[root@node1 development]# tar -zxvf kibana-7.12.0-linux-x86_64.tar.gz
3 修改配置文件
[root@node1 development]# vim elasticsearch-7.12.0/config/elasticsearch.yml
#文件中添加
node.name: node-1
network.host: 0.0.0.0
http.port: 9200
cluster.initial_master_nodes: ["node-1"]
xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true
4 添加运行es的用户
[root@localhost development]# useradd esuser
[root@localhost development]# passwd esuser
5 改变es目录拥有者账号
[root@localhost development]# chown -R esuser /development/elasticsearch-7.12.0
[root@localhost development]# chown -R esuser /development/kibana-7.12.0-linux-x86_64
[root@localhost development]# chmod -R 777 /development/kibana-7.12.0-linux-x86_64
6 修改/etc/sysctl.conf
[root@localhost development]# vim /etc/sysctl.conf
# 末尾添加:
vm.max_map_count=655360
执行sysctl -p 让其生效
[root@localhost development]# sysctl -p
7 修改/etc/security/limits.conf
[root@localhost development]# vim /etc/security/limits.conf
# 末尾添加:
* soft nofile 65536
* hard nofile 65536
* soft nproc 4096
* hard nproc 4096
8 启动es
需要后台启动的话要添加参数
[root@localhost development]# ./elasticsearch -d
9 设置密码
切换到esuser账号
[esuser@localhost development]# ./elasticsearch-setup-passwords auto
注意:自动设置的密码 记录好 后面有用的
浏览器中打开 http://ip:9200/ 输入刚才记录的密码就可以查看es信息了。
10 配置kibana
[esuser@localhost development]# vim /development/kibana-7.12.0-linux-x86_64/config/kibana.yml
server.port: 5601
server.host: "0.0.0.0"
# elasticsearch的IP端口
elasticsearch.hosts: ["http://localhost:9200"]
i18n.locale: "zh-CN"
# elasticsearch的账号
elasticsearch.username: "elastic"
# elasticsearch的密码
elasticsearch.password: "FOZC9haCfBXlxDqLtJ4O"
11 启动kibana
后台启动
[esuser@localhost development]# ./kibana &
12 上传分词器
安装完成。页面可以访问控制台:http://ip:5601/