0.前置条件
0.1 安装jdk8
- 下载安装包
wget https://mirrors.tuna.tsinghua.edu.cn/Adoptium/8/jdk/x64/linux/OpenJDK8U-jdk_x64_linux_hotspot_8u422b05.tar.gz
- 解压并移动到目标路径
tar xzvf OpenJDK8U-jdk_x64_linux_hotspot_8u422b05.tar.gz
mv jdk8u422-b05 jdk8
mv jdk8 /software/
- 配置环境变量
vim ~/.bashrc
export JAVA_HOME=/software/jdk8
export PATH=$PATH:$JAVA_HOME/bin
source ~/.bashrc
- 验证
[root@localhost ~]# java -version
1.源码部署
1.1 下载源码包并解压
下载地址:Download Kibana Free | Get Started Now | Elastic
wget https://artifacts.elastic.co/downloads/kibana/kibana-8.14.3-linux-x86_64.tar.gz
tar xzvf kibana-8.14.3-linux-x86_64.tar.gz
mv kibana-8.14.3 /software/
cd /software/kibana-8.14.3/
1.2 修改配置文件
vim config/kibana.yml
- 修改绑定的ip允许远程访问
server.host: "0.0.0.0"
- Kibana汉化页面
i18n.locale: "zh-CN"
1.3 启动测试
# 目录授权给es用户
chown es:es -R /software/kibana-8.14.3/
# 通过es用户启动
su es
./kibana
1.4 访问测试
1.5 连接Elasticsearch
vim config/kibana.yml
- 修改连接es的配置
elasticsearch.hosts: ["http://localhost:9200"]
- 重启kibana并通过
控制台的开发工具进行连接es测试
# 创建索引
PUT /my-index
# 添加文档(数据)到my-index索引
POST /my-index/_doc
{
"id": "park_rocky-mountain",
"title": "Rocky Mountain",
"description": "Bisected north to south by the Continental Divide, this portion of the Rockies has ecosystems varying from over 150 riparian lakes to montane and subalpine forests to treeless alpine tundra."
}
# 在my-index索引中搜索数据
GET /my-index/_search?q="rocky mountain"
评论 (0)