当前位置: 首页 > article >正文

Elasticsearch,Kibana集成,x-pack鉴权配置

Elasticsearch,Kibana集成

Java8环境部署[CentOS7]
cd /usr/local/src
wget https://repo.huaweicloud.com/java/jdk/8u201-b09/jdk-8u201-linux-x64.tar.gz

tar -xzvf jdk-8u201-linux-x64.tar.gz -C /usr/local
 
 
#配置环境变量
vim /etc/profile
#文末添加
export JAVA_HOME=/usr/local/jdk1.8.0_201
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
 
source /etc/profile
java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

Elasticsearch
https://www.elastic.co/cn/start 

https://www.elastic.co/cn/downloads/elasticsearch
# 修改环境参数
vim /etc/security/limits.conf
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096

vim /etc/sysctl.conf
vm.max_map_count=655360

sysctl -p
# 下载并配置
cd /usr/local/src
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.11.1-linux-x86_64.tar.gz
tar -xzvf  elasticsearch-8.11.1-linux-x86_64.tar.gz -C /usr/local/ 


# 添加新用户
groupadd elastic
useradd elastic -g elastic -p elasticsearch
# 设置文件权限
cd /usr/local/
chown -R elastic:elastic elasticsearch-8.11.1

# 设置数据及日志目录
vim /usr/local/elasticsearch-8.11.1/config/elasticsearch.yml
cluster.name: es-cluster # 集群名
node.name: es-node-01 # 节点名
path.data: /usr/local/elasticsearch-8.11.1/data	# 数据目录
path.logs: /usr/local/elasticsearch-8.11.1/logs	# 日志目录
network.host: 0.0.0.0	# es绑定到地址
http.port: 9200			# es绑定到端口
http.cors.enabled: true
http.cors.allow-origin: "*"


# 关闭并禁用防火墙
service firewalld stop
systemctl disable firewalld

# 切换用户并启动
su elastic
cd /usr/local/elasticsearch-8.11.1/bin
./elasticsearch -d
# 重置账户密码
/usr/local/elasticsearch-8.11.1/bin/elasticsearch-reset-password --username elastic -i

warning: ignoring JAVA_HOME=/usr/local/jdk1.8.0_201; using bundled JDK
This tool will reset the password of the [elastic] user.
You will be prompted to enter the password.
Please confirm that you would like to continue [y/N]y

Enter password for [elastic]:
Re-enter password for [elastic]:
Password for the [elastic] user successfully reset.
https://192.168.18.128:9200/

elastic/elastic

在这里插入图片描述


Kibana
https://www.elastic.co/cn/downloads/kibana
cd /usr/local/src
wget https://artifacts.elastic.co/downloads/kibana/kibana-8.11.1-linux-x86_64.tar.gz
tar -xzvf kibana-8.11.1-linux-x86_64.tar.gz -C /usr/local/ 

# 添加新用户
groupadd kibana
useradd kibana -g kibana -p kibana
# 设置文件权限
cd /usr/local/
chown -R kibana:kibana kibana-8.11.1

vim /usr/local/kibana-8.11.1/config/kibana.yml
server.port: 5601
server.host: "192.168.18.128"
i18n.locale: "zh-CN"

/usr/local/elasticsearch-8.11.1/bin/elasticsearch-create-enrollment-token --scope kibana
warning: ignoring JAVA_HOME=/usr/local/jdk1.8.0_201; using bundled JDK
eyJ2ZXIiOiI4LjExLjEiLCJhZHIiOlsiMTkyLjE2OC4xOC4xMjg6OTIwMCJdLCJmZ3IiOiI1YTU1NTRiOGMxY2FjMzBkOGFiNWQzODhlNWFiMTE2MDgzYzVlMTRkMWE1NTI4Mzc4MmRkMTIyMTkwNDFlYjIyIiwia2V5Ijoicnc0UFBZd0JyTVdzN3NiNkJLWWs6M0xsQnBUS21SUGlVeUFkX0s0MUJodyJ9


# 切换用户并启动
su kibana
cd /usr/local/kibana-8.11.1
nohup bin/kibana > ./logs/start-init.log 2>&1  &

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述


Kibana导入CSV到Elastic

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述


参考链接

https://blog.csdn.net/fu_huo_1993/article/details/127596404


http://www.kler.cn/news/160266.html

相关文章:

  • Pandas 打开有密码的Excel
  • Python中函数添加超时时间,Python中signal使用
  • Linux中的输入输出重定向
  • 城市之眼:数据可视化在智慧城市的角色
  • AWS基于x86 vs Graviton(ARM)的RDS MySQL性能对比
  • MS SQL Table与JSON转换
  • docker基本管理和相关概念
  • 获取网络ppt资源
  • Terraform实战(一)-Terraform介绍与安装部署
  • C语言——二级指针
  • Day46力扣打卡
  • *p++和(*p)++的区别
  • 异常(C++)
  • 【Spring Boot】如何通过RestTemplate获取另一个服务的接口返回信息
  • 深信服行为管理AC设置禁止用户使用向日葵等远程软件
  • 人工智能-语音识别技术paddlespeech的搭建和使用
  • centos用户相关命令
  • python起步
  • 问卷调查须避免的错误要点(02):避免逻辑错误与提升数据质量
  • 基于jsp+servlet+mybatis的简易在线选课系统
  • Dubbo(二)dubbo调用关系
  • golang使用sip协议 用户名和密码注册到vos3000
  • vue3中如何实现事件总线eventBus
  • 【数据结构(八)】哈希表
  • OpenCV-python numpy和基本作图
  • 甘草书店:#8 2023年11月22日 星期三「“说一套做一套”的甘草与麦田」
  • InnoDB的数据存储结构
  • Qt5.15.2的镜像网址
  • 用100ask 6ull配合 飞凌 elf1的教程进行学习的记录 - ap3216
  • SQL手工注入漏洞测试(Sql Server数据库)-墨者