1. install es
Install with Debian package
configuring es
elasticsearch.yaml:
cluster.name: es-test
node.name: es-test-1
node.roles: [ master, data ]
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
# Lock the memory on startup:
bootstrap.memory_lock: true
network.host: 172.20.133.158
discovery.type: single-node # 单节点模式
Systemd configuration
[Service]
LimitMEMLOCK=infinity
reload units:
sudo systemctl daemon-reload
2. Reset user password
Reset the elastic
superuser password
/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
Reset kibana
password
/usr/share/elasticsearch/bin/elasticsearch-reset-password -u kibana
kibana 使用这个账号密码连接 es, 无法使用 elastic
superuser.
check
$ curl -XGET "http://172.20.133.158:9200/_cat/nodes?v"
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/_cat/nodes?v]","header":{"WWW-Authenticate":["Basic realm=\"security\", charset=\"UTF-8\"","ApiKey"]}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/_cat/nodes?v]","header":{"WWW-Authenticate":["Basic realm=\"security\", charset=\"UTF-8\"","ApiKey"]}},"status":401}
$ curl --user elastic -XGET "http://172.20.133.158:9200/_cat/nodes?v"
3. install kibana
Install Kibana with Debian package
configuring kibana
server.host: "172.20.133.158" # externally accessible
elasticsearch.hosts: ["http://172.20.133.158:9200"]
elasticsearch.username: "kibana"
elasticsearch.password: "xxxxxx"
endpoint for LB healthcheck
endpoint: /api/status
Comments