安装虚拟机和安装centOS完整步骤,完美博客
https://www.cnblogs.com/tanghaorong/p/13210470.html
https://www.cnblogs.com/tanghaorong/p/13210794.html
查看docker中装了哪些
docker images 查看容器中安装的中间件
查看docker中的中间件的状态
docker ps -a 查看容器中的中间件
启动docker中的中间件:
docker start ES02(最后是name)
操作文件步骤
vi 文件(进入文件)=》i 开始编辑=》Esc退出=》:wq linux退出并保存(冒号别忘记)
ES启动(docker安装es的天坑)
两步都操作一下
(1条消息) 解决docker启动es自动关闭的问题_杨林伟的博客-CSDN博客_docker启动es失败
(1条消息) Docker搭建Elasticsearch方法及启动后服务自动关闭的问题_Akanemiku的博客-CSDN博客_docker elasticsearch 自动关闭
docker run -e ES_JAVA_OPTS=“-Xms256m -Xmx256m” -e “discovery.type=single-node” -d -p 9200:9200 -p 9300:9300 --name elasticsearch elasticsearch:7.6.2【这步语句搞完就ok,先看上面的博文】
进入容器内部
docker exec ‐it rabbitmq /bin/bash
关闭所有容器中 应用
docker stop $(docker ps -a | awk ‘{ print $1}’ | tail -n +2)
启动所有容器中的应用
docker start $(docker ps -a | awk ‘{ print $1}’ | tail -n +2)
input {
tcp {
mode => "server" host => "0.0.0.0" port => 4560 codec => json_lines type => "debug"
} tcp {
mode => "server" host => "0.0.0.0" port => 4561 codec => json_lines type => "error"
} tcp {
mode => "server" host => "0.0.0.0" port => 4562 codec => json_lines type => "business"
} tcp {
mode => "server" host => "0.0.0.0"
port => 4563 codec => json_lines type => "record"
}
} filter{
if [type
] == "record" {
mutate {
remove_field => "port" remove_field => "host" remove_field => "@version"
} json {
source => "message" remove_field => [
"message"
]
}
}
} output {
elasticsearch {
hosts => "192.168.50.66:9200" index => "mall‐%{type}‐%{+YYYY.MM.dd}"
}
} output {
elasticsearch {
hosts => "es:9200" index => "mall‐%{type}‐%{+YYYY.MM.dd}"
}
}
部署文件的位置