博客
关于我
Linux ElasticSearch 安装和 head安装 和 Kibana安装
阅读量:770 次
发布时间:2019-03-22

本文共 2177 字,大约阅读时间需要 7 分钟。

Elasticsearch 和 Kibana 安装与配置指南

安装Elasticsearch和Kibana是一项复杂的任务,但只要按照以下步骤一步步来,就能顺利完成安装和配置。

环境准备

  • 操作系统:使用CentOS 7虚拟机。
  • 工具:安装MobaXterm终端工具,方便文件传输和操作。
  • 前置安装:确保系统已安装好必要的软件。
  • Elasticsearch 安装

  • 上传安装包:使用MobaXterm拖动Elasticsearch安装包到 /opt 目录。

  • 解压:运行命令解压安装包。

    tar -zxvf elasticsearch-7.4.0-linux-x86_64.tar.gz -C /opt
  • 创建普通用户:创建并设置权限。

    useradd hikktn && passwd hikktnchown -R hikktn:hikktn /opt/elasticsearch-7.4.0
  • 配置Elasticsearch:修改elasticsearch.yml文件,设置集群名、节点名和网络配置。

    vim /opt/elasticsearch-7.4.0/config/elasticsearch.yml
    cluster.name: my-applicationnode.name: node-1network.host: 0.0.0.0http.port: 9200cluster.initial_master_nodes: ["node-1"]
  • 权限优化:为 rookies 设置虚拟内存和文件限制。

    /* Gaussian_limits */vim /etc/security/limits.confhikktn soft nofile 65536hikktn hard nofile 65536echo "hikktn soft nofile 65536" >> /etc/security/limits.conf
  • 启动Elasticsearch:使用普通用户启动。

    su hikktncd /opt/elasticsearch-7.4.0/bin./elasticsearch
  • 停止Elasticsearch:使用管理员权限停止服务。

    ps aux | grep elasticsearchkill -9 77892
  • Kibana 安装

  • 上传安装包:以MobaXterm上传Kibana安装包到 /opt 目录。
  • 解压:解压安装包。
    tar -xzf kibana-7.4.0-linux-x86_64.tar.gz -C /opt
  • 配置Kibana:修改配置文件,设置访问端口和Elasticsearch地址。
    vim /opt/kibana-7.4.0-linux-x86_64/config/kibana.ymlserver.port: 5601server.host: "0.0.0.0"server.name: "kibana-itcast"elasticsearch.hosts: ["http://127.0.0.1:9200"]elasticsearch.requestTimeout: 99999
  • 启动Kibana:确保服务可以通过端口5601访问。
    su hikktncd /opt/kibana-7.4.0-linux-x86_64/bin./kibana --allow-root
  • Head 安装

  • 安装Node.js:以 root 用户安装Node.js环境。
    wget https://nodejs.org/dist/v10.15.2/node-v10.15.2-linux-x64.tar.xztar xvf node-v10.15.2-linux-x64.tar.xzln -s bin/npm /usr/local/bin/ln -s bin/node /usr/local/bin/
  • 配置环境变量:编辑 /etc/profile 文件。
    vi /etc/profileexport NODE_HOME=/opt/nodejs/node-v10.15.2-linux-x64export PATH=$PATH:$NODE_HOME binsource /etc/profile
  • 安装grunt:全局安装grunt命令。
    npm install -g grunt-cli
  • 下载head:使用Git克隆仓库并安装。
    yum -y install git git-cliengit clone git://github.com/mobz/elasticsearch-head.git
  • 配置Elasticsearch:启用CORS支持。
    vim /opt/elasticsearch-7.4.0/config/elasticsearch.ymlhttp.cors.enabled: truehttp.cors.allow-origin: "*"
  • 运行head:在项目目录下启动服务。
    cd elasticsearch-headnpm run start
  • 通过以上步骤,您可以顺利完成Elasticsearch和Kibana的安装与配置。如果在过程中遇到问题,建议检查日志文件或参考官方文档,确保所有服务都已正确启动并运行。

    转载地址:http://ggmwk.baihongyu.com/

    你可能感兴趣的文章
    Ploly:如何在Excel中嵌入完全交互的Ploly图形?
    查看>>
    plotloss记录
    查看>>
    Plotly (Python) 子图:填充构面和共享图例
    查看>>
    Plotly 中的行悬停文本
    查看>>
    Plotly 停用 x 轴排序
    查看>>
    Plotly 域变量解释(多图)
    查看>>
    Plotly 绘制表面 3D 未显示
    查看>>
    Plotly-Dash 存在未知问题并创建“加载依赖项时出错“;通过使用 Python-pandas.date_range
    查看>>
    Plotly-Dash:如何过滤具有多个数据框列的仪表板?
    查看>>
    Plotly:如何为 x 轴上的时间序列设置主要刻度线/网格线的值?
    查看>>
    Plotly:如何从 x 轴删除空日期?
    查看>>
    Plotly:如何从单条迹线制作堆积条形图?
    查看>>
    Plotly:如何以 Root 样式绘制直方图,仅显示直方图的轮廓?
    查看>>
    Plotly:如何使用 Plotly Express 组合散点图和线图?
    查看>>
    Plotly:如何使用 plotly.graph_objects 和 plotly.express 定义图形中的颜色?
    查看>>
    Plotly:如何使用 Python 对绘图对象条形图进行颜色编码?
    查看>>
    Plotly:如何使用 updatemenus 更新一个特定的跟踪?
    查看>>
    Plotly:如何使用长格式或宽格式的 pandas 数据框制作线图?
    查看>>
    Plotly:如何向烛台图添加交易量
    查看>>
    Plotly:如何在 plotly express 中找到趋势线的系数?
    查看>>