安裝 Elasticsearch elasticsearch-8.11.1
下載
訪問 Elasticsearch 下載頁面
解壓下載的壓縮文件到你選擇的目錄。
運行
進入 Elasticsearch 目錄,運行 bin/elasticsearch.bat 啟動 Elasticsearch。
驗證
elaasticsearch的默認訪問路徑是localhost:9200,我們打開瀏覽器直接訪問即可。
如果訪問不了也沒關(guān)系,我們可以先修改配置文件之后再進行訪問。
注意:8.4.3我測試的無法直接打開默認網(wǎng)址,需要先進行配置(原因是:ES8默認開啟了ssl認證,導(dǎo)致無法訪問9200端口,elasticsearch.yml配置文件添加【xpack.security.enabled: false】即可)(https://zhuanlan.zhihu.com/p/504694531)
Elasticsearch在Windows下開啟了安全認證,雖然started成功,但訪問http://localhost:9200/失?。╤ttps://blog.csdn.net/zhangphil/article/details/124476717)
received plaintext traffic on an encrypted channel, closing connection Netty4TcpChannel
修改 elasticsearch.yml
原來是這樣:
# Enable security features
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: true
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["PC-20230404XHIO"]
# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0
我們把幾個安全的暫時都關(guān)閉掉。
# Enable security features
xpack.security.enabled: false
xpack.security.enrollment.enabled: false
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: false
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: false
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["PC-20230404XHIO"]
# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0
重新啟動 es。當(dāng)然這只是為了演示關(guān)閉的,實際應(yīng)用還是要注意安全問題。
PS: 我這里在啟動日志中沒有找到密碼,按理說是有一個初始化密碼的。
驗證成功
此時訪問 http://localhost:9200/文章來源:http://www.zghlxwxcb.cn/news/detail-810940.html
如下:文章來源地址http://www.zghlxwxcb.cn/news/detail-810940.html
{
"name" : "PC-20230404XHIO",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "gROAdkClQka3fHkZukU60A",
"version" : {
"number" : "8.11.1",
"build_flavor" : "default",
"build_type" : "zip",
"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"
}
到了這里,關(guān)于logstack 日志技術(shù)棧-05-windows10 安裝 Elasticsearch elasticsearch-8.11.1 實戰(zhàn)筆記的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!