ES和Kibana的安装

Elasticsearch

安装和启动:

手动下载地址:https://www.elastic.co/cn/downloads/elasticsearch
linux下命令行下载和启动:

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.16.0-linux-x86_64.tar.gz
tar -xzvf elasticsearch-7.16.0-linux-x86_64.tar.gz
cd elasticsearch-7.16.0
./bin/elasticsearch
#验证服务启动成功
curl http://localhost:9200/

服务启动成功,返回信息如下:

{
  "name" : "node-1",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "fglq3Guo566T86ZdEhs-Z2k7w",
  "version" : {
    "number" : "7.16.0",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "6fc81662312141fe7583691d7c1c91b8658ac17aa0d",
    "build_date" : "2021-12-02T15:46:35.697268109Z",
    "build_snapshot" : false,
    "lucene_version" : "8.10.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

Kibana

安装和启动:

手动下载地址:https://www.elastic.co/cn/downloads/kibana
linux下命令行下载和启动:

wget https://artifacts.elastic.co/downloads/kibana/kibana-7.16.0-linux-x86_64.tar.gz
tar -xzvf kibana-7.16.0-linux-x86_64.tar.gz
cd kibana-7.16.0
./bin/kibana
#验证服务启动成功
http://localhost:5601/

如果服务启动成功,访问http://localhost:5601/,会出现如下界面:
在这里插入图片描述

常见报错和解决办法

Elasticsearch

报错1
ERROR: [2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch.
bootstrap check failure [1] of [2]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
bootstrap check failure [2] of [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决办法:
root权限下,在/etc/security/limits.conf 文件中追加两行

elk hard nofile 65536
elk soft nofile 65536  

root权限下,在/etc/sysctl.conf 文件中追加一行

vm.max_map_count=655360

执行 sysctl -p

报错2

如果只能本地访问http://localhost:9200/,但是远程服务器不能访问这台机器的ES
解决办法:
修改config/elasticsearch.yml的配置,具体如下:

network.host: 0.0.0.0
node.name: node-1
cluster.initial_master_nodes: ["node-1"]

Kibana

报错1

如果只能本地访问http://localhost:5601/,但是远程服务器不能访问这台机器的Kibana
解决办法:
修改config/kibana.yml的配置,具体如下:

server.host: "0.0.0.0"
报错2

访问http://localhost:5601/,界面出现Kibana Server not ready yet,启动页面报错为:

Waiting until all Elasticsearch nodes are compatible with Kibana before start......

解决办法:
修改config/elasticsearch.yml的配置,具体如下:

network.host: 0.0.0.0
node.name: node-1
discovery.seed_hosts: ["127.0.0.1"]
cluster.initial_master_nodes: ["node-1"]
安装ElasticsearchKibana,你可以按照以下步骤进行操作: 1. 首先,确保你的系统满足以下要求: - Java 11或更高版本已安装 - 内存至少为2GB 2. 前往Elasticsearch官方网站的下载页面(https://www.elastic.co/downloads/elasticsearch)选择适合你系统的版本。下载完成后,解压缩文件到你想要安装的目录。 3. 打开Elasticsearch的配置文件(位于解压缩目录中的config目录下),根据你的需要进行配置。一般来说,你可以使用默认配置启动Elasticsearch。 4. 执行以下命令启动Elasticsearch: ``` ./bin/elasticsearch ``` 5. 等待一段时间,直到Elasticsearch成功启动。你可以通过访问http://localhost:9200来验证是否成功。 6. 接下来,安装Kibana。前往Kibana官方网站的下载页面(https://www.elastic.co/downloads/kibana),选择适合你系统的版本。下载完成后,解压缩文件到你想要安装的目录。 7. 打开Kibana的配置文件(位于解压缩目录中的config目录下),根据你的需要进行配置。确保将"elasticsearch.hosts"设置为"http://localhost:9200",以便Kibana可以连接到Elasticsearch。 8. 执行以下命令启动Kibana: ``` ./bin/kibana ``` 9. 等待一段时间,直到Kibana成功启动。你可以通过访问http://localhost:5601来打开Kibana的Web界面。 现在,你已经成功安装ElasticsearchKibana。你可以使用Kibana来管理可视化Elasticsearch中的数据。请注意,这只是基本的安装过程,你还可以根据你的需求进行更多的配置定制。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值