首页 > 系统相关 >Linux 安装 Elasticsearch+kibana

Linux 安装 Elasticsearch+kibana

时间:2022-12-15 18:45:28浏览次数:46  
标签:7.15 http kibana elasticsearch Linux Elasticsearch es

参考:Elasticsearch详解及部署 https://www.cnblogs.com/cjzzz/p/16127324.html

下载:https://www.elastic.co/cn/downloads/elasticsearch
     或  https://www.elastic.co/cn/downloads/past-releases#elasticsearch
  
解压:tar -zxvf elasticsearch-7.15.2-linux-x86_64.tar.gz 

修改config下配置文件:elasticsearch.yml
        #将以下注释去除并修改
        #配置es的集群名称
        cluster.name: my-es
        #节点名称
        node.name: node-1
        #设置索引数据的存储路径
        path.data: /usr/local/elasticsearch-7.6.1/data
        #设置日志的存储路径
        path.logs: /usr/local/elasticsearch-7.6.1/logs
        #设置当前的ip地址,通过指定相同网段的其他节点会加入该集群中
        network.host: 0.0.0.0
        #设置对外服务的端口
        http.port: 9200
        #首次启动全新的Elasticsearch集群时,会出现一个集群引导步骤,该步骤确定了在第一次选举中便对其票数进行计数的有资格成为集群中主节点的节点的集合(投票的目的是选出集群的主节点),单节点就配置一个即可
        cluster.initial_master_nodes: ["node-1"]
    内容最后加:
        http.cors.enabled: true
        http.cors.allow-origin: "*"

修改jvm.options 文件
    -Xms256m
    -Xmx256m

添加用户组及用户(出于安全考虑,Elasticsearch默认是不允许使用root账号运行的)
    添加用户:useradd es
更改Elasticsearch文件的拥有者,默认是所属root
    chown -R es:es elasticsearch-7.15.2/
    
启动:bin目录下执行:./elasticsearch -d

若JDK版本太低,可配置环境变量 ES_JAVA_HOME=elasticsearch-7.15.2/jdk

【错误】:ERROR: [1] bootstrap checks failed.  You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: max virtual memory areas vm. max_map_count [65530] is too low, increase to at least [262144]
    解决:修改内存:sysctl -w vm.max_map_count=262144   #重启会失效
          永久修改:/etc/sysctl.conf 文件最后添加一行 vm.max_map_count=262144
          查看内存:sysctl -a|grep vm.max_map_count

验证是否启动成功:
    curl http://192.168.222.129:9200
    {
      "name" : "localhost.localdomain",
      "cluster_name" : "elasticsearch",
      "cluster_uuid" : "_na_",
      "version" : {
        "number" : "7.15.2",
        "build_flavor" : "default",
        "build_type" : "tar",
        "build_hash" : "93d5a7f6192e8a1a12e154a2b81bf6fa7309da0c",
        "build_date" : "2021-11-04T14:04:42.515624022Z",
        "build_snapshot" : false,
        "lucene_version" : "8.9.0",
        "minimum_wire_compatibility_version" : "6.8.0",
        "minimum_index_compatibility_version" : "6.0.0-beta1"
      },
      "tagline" : "You Know, for Search"
    }
**********************************************************************************************************************************************************
【elasticsearch-head】 是用于监控 Elasticsearch 状态的客户端插件,包括数据可视化、执行增删改查操作等。安装之前确保当前系统已经安装 nodejs 即可。
**********************************************************************************************************************************************************
【Kibana安装】
下载地址:https://www.elastic.co/cn/downloads/past-releases/kibana-7-15-2
                 https://mirrors.huaweicloud.com/kibana/?C=N&O=D
    
解压:tar -zxvf kibana-7.15.2-linux-x86_64.tar.gz -C /opt/kibana/

修改配置:vim kibana.yml
    #server.port: 5601
    #本机IP地址
    server.host: "192.168.111.129"
    #ES的端口及地址
    elasticsearch.hosts: ["http://192.168.222.129:9200"]
    elasticsearch.requestTimeout: 90000
    #中文化
    i18n.locale: "zh-CN"
    
授权:
授权ES用户:chown -R es:es kibana-7.15.2/

启动命令:nohup ./kibana &

查看日志:tail -f nohup.out

启动:kibana-7.6.1-linux-x86_64/bin/
    命令:nohup ./kibana &
查看进程
    通过ps -ef|grep kibana是无法查看到
    使用 netstat -tunlp|grep 5601 查看
    
访问:http://192.168.222.129:5601


springboot 连接es 依赖包:
        <dependency>
            <groupId>cn.patterncat</groupId>
            <artifactId>spring-boot-starter-elasticsearch-jdbc</artifactId>
            <version>0.0.1</version>
        </dependency>

 

标签:7.15,http,kibana,elasticsearch,Linux,Elasticsearch,es
From: https://www.cnblogs.com/zhey/p/16985816.html

相关文章

  • Linux 安装 Clickhouse
    下载:https://packagecloud.io/Altinity/clickhousewget--content-dispositionhttps://packagecloud.io/Altinity/clickhouse/packages/el/7/clickhouse-server-common-2......
  • Linux 安装 GitLab
    *********************************************************************************官网:https://about.gitlab.com/    Product——>InstallGitLab——>选......
  • Rocky Linux9.1 手动配置静态IP
    #修改网络的配置文件[root@zabbix~]#vim/etc/NetworkManager/system-connections/ens192.nmconnection[connection]id=ens192uuid=0572911c-bd45-33c3-9442-c896e0320......
  • 使用Rsync在 Linux 上传输文件的示例
    在Linux操作系统上,“rsync”代表远程同步同步。它是用于将文件和目录从源(SRC)同步(复制)到目标(DEST)的实用程序。文件和目录可以在本地主机上同步,也可以在远程主机上......
  • 自制linux系统
    附加一块磁盘并进行分区,至少分区2个,一个用于/boot一个用于根目录/在将创建的分区进行格式化并挂载在/mnt/boot和/mnt/root下分别代表为根目录和boot目录对磁盘464个字节......
  • Linux 常用命令整理
    【常用命令】  查询当前时间:date  修改时间:tzselect #根据提示输入编号  显示当前绝对路径:pwd  重启系统:reboot  在指定文件中查找某内容:grep"某......
  • Linux安装 nginx
    安装nginx:在linux下安装nginx,首先需要安装gcc-c++编译器。执行文件make和安装nginx依赖的pcre和zlib包。最后安装nginx即可。  yum-yinstallmake  yum-y......
  • Linux 安装 Jdk1.8
    1、下载:jdk1.8.0_131-linux-64.tar.gz2、解压:tar-zxvfjdk1.8.0_131-linux-64.tar.gz3、修改环境变量:vi/etc/profile   到文件最低部添加:     exportJA......
  • Linux 安装 Flink
    文档:https://ifeve.com/flink-quick-start/下载地址:https://flink.apache.org/downloads.html下载:https://dlcdn.apache.org/flink/flink-1.15.1/flink-1.15.1-bin-scal......
  • [ Linux ] 线程独立栈,线程分离,Linux线程互斥
    1.线程栈我们使用的线程库是用户级线程库(pthread),我们使用lddmythread可以查看mythread的链接信息。因此对于一个线程(tast_struct)都是通过在共享空间内执行pthread_crea......