日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

最新elasticsearch 8.0 安装配置

發布時間:2024/9/18 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 最新elasticsearch 8.0 安装配置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

2022 年 2 月 11 日,Elastic 8.0 正式發布。
這里進行試用。

首先下載elasticsearch-8.0.1-linux-x86_64.tar.gz,并解壓

修改配置文件elasticsearch.yml:

cluster.name: elasticsearch node.name: node-1 node.attr.rack: r1 path.data: /home/$USER/app/elasticsearch-8.0.1/data/ path.logs: /home/$USER/app/elasticsearch-8.0.1/logs/ network.host: 192.168.171.51 http.port: 9201 transport.profiles.default.port: 9301 discovery.seed_hosts: ["192.168.171.51:9301"] cluster.initial_master_nodes: ["node-1"] http.cors.enabled: true http.cors.allow-origin: "*" http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

其中設置:

http.cors.enabled: true http.cors.allow-origin: "*" http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

主要是為了在elasticsearch head中可以進行訪問。

啟動elasticsearch:./bin/elasticsearch,在啟動過程中會出現默認設置的密碼:

這個密碼可以通過命令./bin/elasticsearch-reset-password -u elastic進行重置:

在瀏覽器中輸入https://192.168.171.51:9201/然后輸入用戶名和密碼就可以顯示狀態了:

可以通過elasticsearch-head工具進行查看,需要在head地址中添加http://localhost:9100/?auth_user=elastic&auth_password=對應密碼:

關閉xpack

如果不需要安全訪問設置,可以將配置文件elasticsearch.yml添加設置如下:

xpack.security.transport.ssl.enabled: false xpack.security.http.ssl.enabled: falsexpack.ml.enabled: false xpack.monitoring.collection.enabled: false xpack.security.enabled: false xpack.watcher.enabled: false

修改kibana設置:

server.publicBaseUrl: "http://192.168.171.51:5601" elasticsearch.hosts: ["http://192.168.171.51:9201"] server.host: "0.0.0.0"

總結

以上是生活随笔為你收集整理的最新elasticsearch 8.0 安装配置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。