OpenSearch

OpenSearch

OpenSearch

OpenSearch在之前是和Elasticsearch同源的软件,由于许可证,在 Elasticsearch上有一个新分支OpenSearch,目前你也可以在各个云平台搜到 OpenSearch,一般做智能推荐或者全文检索等等,由于OpenSearch完全开源,不用担心商用等的许可证问题,作为 Elasticsearch的开源替代,可以了解一下

install

由于这里我只是试用一下,所以就按照docker的方式安装了,但是docker我这边 timeout,还是决定按照 https://opensearch.org/docs/latest/install-and-configure/install-opensearch/debian/ 这个里面的引导通过源进行下载

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

➜  /tmp echo "deb [signed-by=/usr/share/keyrings/opensearch-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable main" | sudo tee /etc/apt/sources.list.d/opensearch-2.x.list
➜  /tmp sudo env OPENSEARCH_INITIAL_ADMIN_PASSWORD=ada1@@Axmin apt-get install opensearch
➜  /tmp curl -X GET https://localhost:9200 -u 'admin:ada1@@Axmin' --insecure
{
  "name" : "liuliancao-com",
  "cluster_name" : "opensearch",
  "cluster_uuid" : "wpBfHhhDSdKhM1s3u1b2tg",
  "version" : {
    "distribution" : "opensearch",
    "number" : "2.16.0",
    "build_type" : "deb",
    "build_hash" : "f84a26e76807ea67a69822c37b1a1d89e7177d9b",
    "build_date" : "2024-08-06T20:30:45.075317690Z",
    "build_snapshot" : false,
    "lucene_version" : "9.11.1",
    "minimum_wire_compatibility_version" : "7.10.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "The OpenSearch Project: https://opensearch.org/"
}

# dashboard
➜  /tmp echo "deb [signed-by=/usr/share/keyrings/opensearch-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/2.x/apt stable main" | sudo tee /etc/apt/sources.list.d/opensearch-dashboards-2.x.list
➜  /tmp sudo apt-get install opensearch-dashboards

这里注意记得改下opensearch-dashboards的opensearch的用户名密码的配置, 否则一直会报错

1
2
3
4
5
6
root@liuliancao-com:/etc/opensearch-dashboards# grep -E 'username|pass' opensearch_dashboards.yml
# the username and password that the OpenSearch Dashboards server uses to perform maintenance on the OpenSearch Dashboards
# opensearch.username: "opensearch_dashboards_system"
# opensearch.password: "pass"
opensearch.username: admin
opensearch.password: kada1@@Axmin