杨梅冲
每天在想什么呢?

一、opensearch简介

官网:https://www.opensearch.org/

下载:https://www.opensearch.org/versions/opensearch-2-11-1.html

1.1 OpenSearch的基本概念和特点

OpenSearch是由数据存储和搜索引擎(OpenSearch)、可视化和用户界面 (OpenSearch Dashboards) 以及服务器端数据收集器 (Data Prepper) 组成的。
OpenSearch使用Apache Lucene作为其核心搜索引擎,并提供了与供应商无关的工具集,可以用来构建安全、高性能、经济高效的应用程序。
OpenSearch提供了一系列插件,以帮助用户扩展其搜索和分析功能,包括增强搜索、分析、可观察性、安全性、机器学习等。
OpenSearch项目于2021年1月首次宣布,作为Elasticsearch和Kibana的开源分支,旨在提供安全、高质量、完全开源的搜索和分析套件。
OpenSearch提供了一个全面的项目路线图,并自项目启动以来,已发展到拥有100多个贡献者、数千个拉取请求、数千个问题已解决,并在90多个存储库中进行组织。
OpenSearch可在Apache 2.0许可证下获得许可,为用户提供了修改、扩展、货币化和转售产品的自由,以及在各种基础设施上部署的灵活性。
OpenSearch具备高度的可扩展性和灵活性,可以作为端到端解决方案的一部分,或与用户首选的开源工具或合作伙伴项目相连接。
OpenSearch支持全文查询、自然语言处理、自定义词典和一系列搜索功能,为结构化和非结构化搜索应用程序提供了灵活的基础

二、搭建

2.1 搭建单机版

# 1.新建opensearch账号,不支持 root启动
useradd opensearch

# 2.配置文件
cd opensearch-2.11.1
mkdir {data,logs}

cd opensearch-2.11.1/config
cat opensearch.yml | grep -v "^#" | grep -v "^$"
path.data: /usr/local/opensearch-2.11.1/data
path.logs: /usr/local/opensearch-2.11.1/logs
http.port: 9200
network.host: 0.0.0.0
discovery.type: single-node
plugins.security.disabled: true

cd opensearch-dashboards-2.11.1/config
cat opensearch_dashboards.yml | grep -v "^#" | grep -v "^$"
---
opensearch.hosts: [http://localhost:9200]
server.ssl.enabled: false
server.host: "0.0.0.0"

# server.ssl.enabled: false 禁用 ssl
# opensearch.hosts 没有 ssl,需要将 https改为http

2.2 启动

# opensearch启动
cd opensearch-2.11.1
./opensearch-tar-install.sh -d

# opensearch-dashboard启动
cd opensearch-dashboards-2.11.1/bin
nohup ./opensearch-dashboards &

2.3 查看

# 验证是否启动成功:
curl -XGET http://localhost:9200/_cat/plugins?v -u 'admin:admin'
name      component                            version
linux-242 opensearch-alerting                  2.11.1.0
linux-242 opensearch-anomaly-detection         2.11.1.0
linux-242 opensearch-asynchronous-search       2.11.1.0
linux-242 opensearch-cross-cluster-replication 2.11.1.0
linux-242 opensearch-custom-codecs             2.11.1.0
linux-242 opensearch-geospatial                2.11.1.0
linux-242 opensearch-index-management          2.11.1.0
linux-242 opensearch-job-scheduler             2.11.1.0
linux-242 opensearch-knn                       2.11.1.0
linux-242 opensearch-ml                        2.11.1.0
linux-242 opensearch-neural-search             2.11.1.0
linux-242 opensearch-notifications             2.11.1.0
linux-242 opensearch-notifications-core        2.11.1.0
linux-242 opensearch-observability             2.11.1.0
linux-242 opensearch-performance-analyzer      2.11.1.0
linux-242 opensearch-reports-scheduler         2.11.1.0
linux-242 opensearch-security                  2.11.1.0
linux-242 opensearch-security-analytics        2.11.1.0
linux-242 opensearch-sql                       2.11.1.0

# 页面查看
http://10.1.1.242:9200/
"name" : "linux-242",
  "cluster_name" : "opensearch",
  "cluster_uuid" : "HkVxcP-wRZOln-vOpE5Irw",
  "version" : {
    "distribution" : "opensearch",
    "number" : "2.11.1",
    "build_type" : "tar",
    "build_hash" : "6b1986e964d440be9137eba1413015c31c5a7752",
    "build_date" : "2023-11-29T21:43:10.135035992Z",
    "build_snapshot" : false,
    "lucene_version" : "9.7.0",
    "minimum_wire_compatibility_version" : "7.10.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "The OpenSearch Project: https://opensearch.org/"

# dashboard访问
http://10.1.1.242:5601/
# dashboard默认密码不清楚,我禁用掉了securityDashboards 插件,不用密码也可以登录 dashboard了
cd opensearch-dashboards-2.11.1/plugins/
mv securityDashboards securityDashboards_bak

 

posted on 2024-07-03 10:35  杨梅冲  阅读(13)  评论(0编辑  收藏  举报