最新elasticsearch 8.0 安装配置
生活随笔
收集整理的這篇文章主要介紹了
最新elasticsearch 8.0 安装配置
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
2022 年 2 月 11 日,Elastic 8.0 正式發(fā)布。
這里進行試用。
首先下載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其中設(shè)置:
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,在啟動過程中會出現(xiàn)默認設(shè)置的密碼:
這個密碼可以通過命令./bin/elasticsearch-reset-password -u elastic進行重置:
在瀏覽器中輸入https://192.168.171.51:9201/然后輸入用戶名和密碼就可以顯示狀態(tài)了:
可以通過elasticsearch-head工具進行查看,需要在head地址中添加http://localhost:9100/?auth_user=elastic&auth_password=對應(yīng)密碼:
關(guān)閉xpack
如果不需要安全訪問設(shè)置,可以將配置文件elasticsearch.yml添加設(shè)置如下:
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設(shè)置:
server.publicBaseUrl: "http://192.168.171.51:5601" elasticsearch.hosts: ["http://192.168.171.51:9201"] server.host: "0.0.0.0"總結(jié)
以上是生活随笔為你收集整理的最新elasticsearch 8.0 安装配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 王者荣耀神钩对决怎么进?
- 下一篇: BOXX 推出 APEXX T4 PRO