赞
踩
阿里云、腾讯运、华为云服务器开通;按量付费,省钱省心
安装中间件
docker、redis、kafka、prometheus、grafana
下载windterm链接:
https://github.com/kingToolbox/WindTerm/releasses/download/2.5.0/WindTerm_2.5.0_Windows_Portable_x86_64.zip
在终端输入ssh-Keygen
密钥路径
安装命令:
yum -y install yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
yum -y install docker-ce
# 启动Docker服务
systemctl start docker
# 设置开机自动启动
systemctl enable docker
#查看状态
systemctl status docker
Errors during downloading metadata for repository ‘root’:
找到 /etc/yum.repos.d 目录下的文件 root_.repo 打开后 将其中的enabled改成等于0
docker ps
version: '3.8'
services:
redis:
image: redis:latest
ports:
- 6379:6379
prometheus:
image: prom/prometheus:latest
ports:
- 9090:9090
volumes:
- ./prometheus:/etc/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
kafka:
image: bitnami/kafka:3.4.0
container_name: kafka
restart: always
depends_on:
- zookeeper
ports:
- 9092:9092
environment:
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_CREATE_TOPICS: topic1:1:1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
kafka-ui:
image: provectuslabs/kafka-ui:latest
container_name: kafka-ui
restart: always
depends_on:
- kafka
ports:
- 8080:8080
environment:
KAFKA_CLUSTERS_0_NAME: dev
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
volumes:
- /var/run/docker.sock:/var/run/docker.sock
zookeeper:
image: wurstmeister/zookeeper:latest
ports:
- 2181:2181
grafana:
image: grafana/grafana:latest
ports:
- 3000:3000
volumes:
- ./grafana:/var/lib/grafana
mysql:
image: mysql:latest
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: your_mysql_password
volumes:
- ./mysql:/var/lib/mysql
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'prometheus'
scrape_interval: 5s
static_configs:
- targets: ['localhost:9090']
- job_name: 'redis'
scrape_interval: 5s
static_configs:
- targets: ['redis:6379']
- job_name: 'kafka'
scrape_interval: 5s
static_configs:
- targets: ['kafka:9092']
- job_name: 'mysql'
scrape_interval: 5s
static_configs:
- targets: ['mysql:3306']
mkdir prod
vim prometheus.yml
docker compose -f docker-compose.yml up -d
链接:https://redis.com/redis-enterprise/redis-insight/#insight-form
安装docker和启动相关服务需要使用linx命令修改文件,所以修改文件的命令需要牢记
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。