ElasticSearch之安装

参照Installing Elasticsearch,完成验证集群的部署。

操作步骤

  • 下载软件包和摘要文件。

    wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.11.1-linux-x86_64.tar.gz
    wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.11.1-linux-x86_64.tar.gz.sha512
  • 校验压缩包的完整性。

    shasum -a 512 -c elasticsearch-8.11.1-linux-x86_64.tar.gz.sha512
  • 解压软件包。

    tar -xzf elasticsearch-8.11.1-linux-x86_64.tar.gz
  • 启动elasticsearch服务。

    cd elasticsearch-8.11.1/
    export ELASTIC_PASSWORD="espass"
    ./bin/elasticsearch
  • 修改口令。注意需要新开一个shell命令行窗口。

    ./bin/elasticsearch-reset-password -u elastic

    命令的输出如下:

    This tool will reset the password of the [elastic] user to an autogenerated value.
    The password will be printed in the console.
    Please confirm that you would like to continue [y/N]y
    Password for the [elastic] user successfully reset.
    New value: ohCxPH=QBE+s5=*lo7F9

    得到新的口令为ohCxPH=QBE+s5=*lo7F9

  • 检查服务是否可用。

    export ES_HOME=~/elasticsearch-8.11.1
    curl --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9" https://localhost:9200

    输出如下:

    {
    "name" : "jackie-ubuntu",
    "cluster_name" : "elasticsearch",
    "cluster_uuid" : "BH48zgLGR9S0mjjShrpyFA",
    "version" : {
    "number" : "8.11.1",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "6f9ff581fbcde658e6f69d6ce03050f060d1fd0c",
    "build_date" : "2023-11-11T10:05:59.421038163Z",
    "build_snapshot" : false,
    "lucene_version" : "9.8.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
    },
    "tagline" : "You Know, for Search"
    }

相关资料

posted @   jackieathome  阅读(111)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
点击右上角即可分享
微信分享提示