Elasticsearch 7.17.12 单机安装

下载适配JDK

​https://www.oracle.com/java/technologies/downloads/archive/
​https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html

# 配置环境变量 cat /etc/profile
# export JAVA_HOME=/home/elk/jdk1.8.0_121
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$CLASSPATH

export JAVA_HOME=/home/elk/elasticsearch-7.10.2/jdk
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib


export ES_JAVA_HOME=/home/elk/elasticsearch-7.17.12/jdk
export PATH=$PATH:$ES_JAVA_HOME/bin
export CLASSPATH=.:$ES_JAVA_HOME/lib

安装

下载

https://artifacts.elastic.co/downloads/kibana/kibana-7.17.12-linux-x86_64.tar.gz
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.12-linux-x86_64.tar.gz

配置

vi ./config/elasticsearch.yml 

network.host: 192.168.10.22
http.port: 9208

# 在添加下面参数让elasticsearch-head插件可以访问es
http.cors.enabled: true
http.cors.allow-origin: "*"
transport.tcp.port: 9308

discovery.seed_hosts: ["192.168.10.22"]
cluster.initial_master_nodes: ["192.168.10.22"]

xpack.security.enabled: false

vi ./config/kibana.yml 

server.host: "0.0.0.0"
elasticsearch.hosts: ["http://192.168.10.22:9208"]

 安装ik分词器

https://github.com/medcl/elasticsearch-analysis-ik/releases?page=2
assets
下载 elasticsearch-analysis-ik-7.17.7.zip

chmod +x elasticsearch-analysis-ik-7.17.7.zip
unzip -o -d ./analysis-ik elasticsearch-analysis-ik-7.17.7.zip
chown -R elk:elk analysis-ik
mv ./analysis-ik ./elasticsearch-7.17.12/plugins/

vi plugin-descriptor.properties
elasticsearch.version=7.17.12

你可能感兴趣的:(elasticsearch,elasticsearch,大数据,搜索引擎)