Elasticsearch 的安装与简单配置
【安装与配置】
下载
curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.2.0-linux-x86_64.tar.gz 解压
tar -xvf elasticsearch-7.2.0-linux-x86_64.tar.gz 后续所有操作都在 elasticsearch-7.2.0 目录里面进行
cd ./elasticsearch-7.2.0/ 编辑 ./config/elasticsearch.yml
添加或修改
node.name: node-1 network.host: 0.0.0.0 http.port: 9200 cluster.initial_master_nodes: ["node-1"] 修改系统配置,编辑 /etc/sysctl.conf
添加或修改
sudo sysctl -p 使修改生效
vm.max_map_count = 262144 修改 ECS 安全组,放行 9200 端口
启动 elasticsearch
./bin/elasticsearch 浏览器访问 http://112.74.外.外:9200/,可以看到如下内容
{ "name" : "node-1", "cluster_name" : "elasticsearch", "cluster_uuid" : "npPY-fmfRwqJKLKA30ym3Q", "version" : { "number" : "7.2.0", "build_flavor" : "default", "build_type" : "tar", "build_hash" : "508c38a", "build_date" : "2019-06-20T15:54:18.811730Z", "build_snapshot" : false, "lucene_version" : "8.0.0", "minimum_wire_compatibility_version" : "6.8.0", "minimum_index_compatibility_version" : "6.0.0-beta1" }, "tagline" : "You Know, for Search" }
【插件】
查看已安装哪些插件
./bin/elasticsearch-plugin list 安装 analysis-icu 插件
./bin/elasticsearch-plugin install analysis-icu 重启 elasticsearch,访问 http://112.74.外.外:9200/_cat/plugins,可以看到如下内容
node-1 analysis-icu 7.2.0
相关文章