yum安装ELK6.4.2版本
时间: 2024-04-10 14:20:33 浏览: 83
Linux yum安装指定版本的MySQL(如MySQL5.7)
以下是在 CentOS 7 上安装 ELK 6.4.2 的步骤:
1. 首先,需要安装 Java 8:
```bash
sudo yum install java-1.8.0-openjdk-devel
```
2. 安装 Elasticsearch:
```bash
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
sudo vi /etc/yum.repos.d/elasticsearch.repo
```
在文件中添加以下内容:
```
[elasticsearch-6.x]
name=Elasticsearch repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
```
然后执行以下命令安装 Elasticsearch:
```bash
sudo yum install elasticsearch-6.4.2
```
3. 安装 Logstash:
```bash
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
sudo vi /etc/yum.repos.d/logstash.repo
```
在文件中添加以下内容:
```
[logstash-6.x]
name=Elastic repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
```
然后执行以下命令安装 Logstash:
```bash
sudo yum install logstash-6.4.2
```
4. 安装 Kibana:
```bash
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
sudo vi /etc/yum.repos.d/kibana.repo
```
在文件中添加以下内容:
```
[kibana-6.x]
name=Kibana repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
```
然后执行以下命令安装 Kibana:
```bash
sudo yum install kibana-6.4.2
```
5. 启动 Elasticsearch、Logstash 和 Kibana:
```bash
sudo systemctl start elasticsearch
sudo systemctl start logstash
sudo systemctl start kibana
```
现在,ELK 6.4.2 已经安装完成了。你可以通过访问 `http://<your-server-ip>:5601` 来进入 Kibana 的 Web 界面。
阅读全文