Elasticsearch6.8在Linux下的安装部署
Elasticsearch 6.8 在 Linux 下的安装部署
Elasticsearch 简介:
核⼼功能:搜索和分析数据
官⽅⽂档介绍如下:
You know, for search (and analysis)
Elasticsearch is the distributed search and analytics engine at the heart of the Elastic Stack.
Elasticsearch provides real-time search and analytics for all types of data.
安装前需要知道的事:
Elasticsearch 版本需对应的 Java 版本:
建议安装前在官⽹查询:/cn/support/matrix#matrix_jvm
linux系统地址
实际在安装过程中发现,虽然 Elasticsearch 7 以上的版本⽀持 Java 1.8.0 ,但是运⾏时会提⽰使⽤ Java 11,故,我在这⾥选择安装的是 Elasticsearch 6.8.13 。具体版本⽀持的 Java 版本,可在对应 Elasticsearch 的安装⽂档中 Set up Elasticsearch 选项查询到。
Elasticsearch 不能在 root ⽤户下运⾏,我们⼀般新建⼀个普通⽤户,在该普通⽤户的主⽬录下安装。
mkdir /data
groupadd hadoop
useradd -g hadoop -d /data/hadooper hadooper
passwd hadooper
su hadooper
在这⾥可以先不创建该⽤户,可以等报错时再解决,注意⽂件的权限问题,需将⽂件的所有者改为 hadooper 。
chown -R hadooper:hadoop /data/hadooper/elasticsearch
Elasticsearch 下载与安装:
wget /downloads/elasticsearch/elasticsearch-6.8.
wget /downloads/elasticsearch/elasticsearch-6.8.sha512
shasum -a 512 -c elasticsearch-6.8.sha512
tar -xzf elasticsearch-6.8.
cd elasticsearch-6.8.13/
Elasticsearch 运⾏:
$ES_HOME/bin/elasticsearch
⾄此,初步的下载安装已经完成,也可以正常运⾏,但要注意,程序不会⾃⾏跳出⾄命令⾏。
打开本地浏览器地址栏,输⼊: ip:9200 ⽆法访问,但是可以通过在终端 shell中输⼊ crul "localhost:9200" 正确返回 json ,可通过以下⽅式解决:
1. 将 $ES_HOME/config/l ⽂件中的 network.host 属性改为 network.host: 0.0.0.0 。
2. 关闭防⽕墙。
再度打开浏览器重复上述步骤,浏览器返回 json :
{
"name":"CNYxjZh",
"cluster_name":"elasticsearch",
"cluster_uuid":"CVJps8pSQFKVNTGRnmUXew",
"version":{
"number":"6.8.13",
"build_flavor":"default",
"build_type":"tar",
"build_hash":"be13c69",
"build_date":"2020-10-16T09:09:46.555371Z",
"build_snapshot": false,
"lucene_version":"7.7.3",
"minimum_wire_compatibility_version":"5.6.0",
"minimum_index_compatibility_version":"5.0.0"
},
"tagline":"You Know, for Search"
}
插件:
将插件下载并解压到 $ES_HOME/plugins 下即可,但是在Elasticsearch 5 以上的版本中,不能直接将 es-head 安装在该⽬录下 。以sql为例,其安装⽬录为:
$ES_HOME/plugins/sql

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。