Linux下部署EasySearch

Linux下部署EasySearch

es 官网

https://www.infinilabs.cn/

Linux 环境下使用 Easysearch
https://docs.infinilabs.com/easysearch/main/docs/getting-started/install/linux/

根据环境下载:
https://www.infinilabs.cn/download/


①:安装之前确保已经安装好JAVA环境;


②:安装部署

(1):在Linux中创建easysearch目录

 cd /opt && mkdir easysearch

(2):解压到目录

tar -zxf easysearch-1.12.2-2120-linux-amd64-bundle.tar.gz -C /opt/easysearch

(3):修改配置文件

cd config
vim easysearch.yml

在这里插入图片描述

#path.data: /path/to/data
#path.logs: /path/to/logs
#bootstrap.memory_lock: true
network.host: 0.0.0.0
#http.port: 9200
discovery.seed_hosts: ["172.0.0.0:9300", "172.0.0.0:9301"]
cluster.initial_master_nodes: ["172.0.0.0:9300"]
#gateway.recover_after_nodes: 3
#action.destructive_requires_name: true
#cluster.routing.allocation.disk.threshold_enabled: false
#node.max_local_storage_nodes: 3
#bootstrap.system_call_filter: false
#elasticsearch.api_compatibility: true
#elasticsearch.api_compatibility_version: "8.9.0"

(4):初始化在easysearch目录下执行,执行过程中遇到 [y/N] 询问,输入 y 即可。初始化完成,

./bin/initialize.sh

初始化完成,到initialize.log中查看用户名密码

cd logs
cat initialize.log

(5):启动,Easysearch 不支持通过 root 身份来运行,需要新建普通用户,如 一个用户来快速运行 Easysearch。

groupadd -g 602 easysearch
useradd -u 602 -g easysearch -m -d /home/easysearch -c 'easysearch' -s /bin/bash easysearch

#授权
chown -R easysearch:easysearch /opt/easysearch

(6):切换用户运行

#切换用户
su easysearch

#在easysearch目录下执行后台启动
nohup ./bin/easysearch &

#运行
curl -ku admin:8bacf64b8e021510c20a https://localhost:9200

运行时出现initializing 配置文件问题,重新配置!!!

成功运行;
[easysearch@localhost logs]$ curl -ku admin:8bacf64b8e021510c20a https://localhost:9200
{
  "name" : "node-1",
  "cluster_name" : "my-application",
  "cluster_uuid" : "yuB_Wt_-T2uWS0_pSU2XsQ",
  "version" : {
    "number" : "7.17.18",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "b849a135ea623c762523abca44d1831ebaba235c",
    "build_date" : "2025-05-16T01:01:57.681844Z",
    "build_snapshot" : false,
    "lucene_version" : "7.0.0",
    "minimum_wire_compatibility_version" : "6.7.0",
    "minimum_index_compatibility_version" : "6.0.0"
  },
  "tagline" : "You Know, for Search"
}

集群搭建

参考文档
https://docs.infinilabs.com/easysearch/main/docs/getting-started/configuration_file/
https://docs.infinilabs.com/easysearch/main/docs/references/management/cluster/

(1):创建easysearch2文件夹解压
(2):修改配置文件

cluster.name: my-application
node.name: node-2
#path.data: /path/to/data
#path.logs: /path/to/logs
#bootstrap.memory_lock: true
network.host: 0.0.0.0
#http.port: 9200
discovery.seed_hosts: ["172.0.0.0:9300", "172.0.0.0:9301"]
#cluster.initial_master_nodes: ["172.0.0.0:9300"]
#gateway.recover_after_nodes: 3
#action.destructive_requires_name: true
#cluster.routing.allocation.disk.threshold_enabled: false
#node.max_local_storage_nodes: 3
#bootstrap.system_call_filter: false
#elasticsearch.api_compatibility: true
#elasticsearch.api_compatibility_version: "8.9.0"

主节点已经配置好,并启动了,所以这里只需要加入就好了。

初始化秘钥拷贝
cp ../../easysearch/config/*.crt .
cp ../../easysearch/config/*.key .

(3):切换用户启动

curl -ku admin:8bacf64b8e021510c20a https://localhost:9200/_cat/nodes

Console控制台

下载:
https://www.infinilabs.cn/download/?product=console
console下载我在windows下,下载解压运行即可;
运行:http://localhost:9000/#/overview

学习
https://docs.infinilabs.com/console/main/zh/docs/reference/overview/

  • SpringBoot实现数据库同步ES,参考 这儿,

  • SpringBoot使用es实现搜索,参考 这儿,

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值