//1安装mq
//解压文件
[root@localhost jyw]# unzip rocketmq-4.5.zip
Archive: rocketmq-4.5.zip creating: rocketmq-4.5/ inflating: rocketmq-4.5/docker-compose.yml inflating: rocketmq-4.5/init.sh creating: rocketmq-4.5/conf/ creating: rocketmq-4.5/conf/rmq/ inflating: rocketmq-4.5/conf/rmq/broker.conf creating: rocketmq-4.5/data/ creating: rocketmq-4.5/data/rmq/ creating: rocketmq-4.5/data/rmq/rmqnamesrv/ creating: rocketmq-4.5/data/rmq/rmqbroker/ creating: rocketmq-4.5/logs/ creating: rocketmq-4.5/logs/rmq/ creating: rocketmq-4.5/logs/rmq/rmqnamesrv/ creating: rocketmq-4.5/logs/rmq/rmqbroker/
// 进入文件目录
[root@localhost jyw]# cd rocketmq-4.5
[root@localhost rocketmq-4.5]# ls
conf data docker-compose.yml init.sh logs
// 删除日志文件
[root@localhost rocketmq-4.5]# rm -rf logs/
[root@localhost rocketmq-4.5]# cd conf/
[root@localhost conf]# ls
rmq
[root@localhost conf]# cd rmq/
[root@localhost rmq]# ls
broker.conf
// 进入 broker.conf 配置ip地址
[root@localhost rmq]# vi broker.conf
//执行 init.sh
[root@localhost rocketmq-4.5]# . init.sh
//以后台的方式运行容器
[root@localhost rocketmq-4.5]# docker-compose up -d
Creating network "rmq" with driver "bridge" Pulling rmqnamesrv (foxiswho/rocketmq:server-4.5.2)... server-4.5.2: Pulling from foxiswho/rocketmq d8d02d457314: Pull complete 6a033662d666: Pull complete 6a344a7ea766: Pull complete 355a77992c5d: Pull complete f18ae18f7478: Pull complete d5f21775c6e5: Pull complete 109663a5aa91: Pull complete c1cc0cdb7244: Pull complete cb1244711c03: Pull complete 252241269741: Pull complete Pulling rmqbroker (foxiswho/rocketmq:broker-4.5.2)... broker-4.5.2: Pulling from foxiswho/rocketmq d8d02d457314: Already exists 6a033662d666: Already exists 6a344a7ea766: Already exists 355a77992c5d: Already exists f18ae18f7478: Already exists d5f21775c6e5: Already exists 109663a5aa91: Already exists c1cc0cdb7244: Already exists cb1244711c03: Already exists 252241269741: Already exists Pulling rmqconsole (styletang/rocketmq-console-ng:)... latest: Pulling from styletang/rocketmq-console-ng e12c678537ae: Pull complete 8d9ed335b7db: Pull complete 3318dd58ae60: Pull complete 624ba6156166: Pull complete c7a02d193df7: Pull complete 813b62320378: Pull complete 49e2d6393f32: Pull complete 0a2b7222259b: Pull complete 478657249124: Pull complete 5f8636e9fbb7: Pull complete Creating rmqnamesrv ... done Creating rmqconsole ... done Creating rmqbroker ... done
// 查看docker启动的镜像
[root@localhost rocketmq-4.5]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 321b16217481 foxiswho/rocketmq:broker-4.5.2 "/bin/bash mqbroker …" 17 seconds ago Up 11 seconds 0.0.0.0:10909->10909/tcp, :::10909->10909/tcp, 9876/tcp, 10912/tcp, 0.0.0.0:10911->10911/tcp, :::10911->10911/tcp rmqbroker 0a3ab5eaf08a styletang/rocketmq-console-ng "sh -c 'java $JAVA_O…" 17 seconds ago Up 11 seconds 0.0.0.0:8180->8080/tcp, :::8180->8080/tcp rmqconsole b8b816721327 foxiswho/rocketmq:server-4.5.2 "/bin/sh -c 'cd ${RO…" 23 seconds ago Up 16 seconds 10909/tcp, 0.0.0.0:9876->9876/tcp, :::9876->9876/tcp, 10911-10912/tcp rmqnamesrv
//2 继续安装ELK
//解压文件
[root@localhost jyw]# unzip elk.zip
Archive: elk.zip creating: elk/ inflating: elk/docker-compose.yml inflating: elk/elk.zkip inflating: elk/internal_users.yml creating: elk/logstash/ creating: elk/logstash/conf.d/ inflating: elk/logstash/conf.d/logstash.conf inflating: elk/init.sh inflating: elk/internal_users.yml.bak inflating: elk/remove_old_data.sh inflating: elk/roles.yml
[root@localhost jyw]# ls
docker_log_size.sh elk elkDocker elk.zip jenkins mysql57 rocketmq rocketmq-4.5 rocketmq-4.5.zip
[root@localhost jyw]# cd elk
[root@localhost elk]# ls
docker-compose.yml elk.zkip init.sh internal_users.yml internal_users.yml.bak logstash remove_old_data.sh roles.yml
[root@localhost elk]# cd logstash/
[root@localhost logstash]# ls
conf.d
[root@localhost logstash]# cd ..
[root@localhost elk]# ls
docker-compose.yml elk.zkip init.sh internal_users.yml internal_users.yml.bak logstash remove_old_data.sh roles.yml
//执行init.sh
[root@localhost elk]# ./init.sh
vm.max_map_count = 262144
//以后台的方式运行容器
[root@localhost elk]# docker-compose up -d
Creating network "elk_odfe-net" with the default driver Pulling odfe-node1 (amazon/opendistro-for-elasticsearch:1.12.0)... 1.12.0: Pulling from amazon/opendistro-for-elasticsearch 2d473b07cdd5: Pull complete 8693b6c0e2c5: Pull complete 712d056466f4: Pull complete 9def9218577f: Pull complete e207d640d1e9: Pull complete 4e7c6ab72cfd: Pull complete 8b29a382e0e9: Pull complete c771613b68c8: Pull complete e062f221aa0a: Pull complete a3eaa159fc94: Pull complete 01e90bb1e6e8: Pull complete f61e4af98540: Pull complete 5a646b1be245: Pull complete Pulling kibana (amazon/opendistro-for-elasticsearch-kibana:1.12.0)... 1.12.0: Pulling from amazon/opendistro-for-elasticsearch-kibana 2d473b07cdd5: Already exists fe9523cde177: Pull complete b1bf3e1abe05: Pull complete f688fc5e40fa: Pull complete e18dd98650b6: Pull complete 3b0b6af561de: Pull complete e92abb297b0d: Pull complete 6332c1e7f595: Pull complete 237328762bd1: Pull complete a680ba0c59d6: Pull complete Pulling logstash (leviocil/logstash-oss:6.7.1)... 6.7.1: Pulling from leviocil/logstash-oss 8ba884070f61: Pull complete 0ea8e988533d: Pull complete 96f010dd22ab: Pull complete be81b1de842e: Pull complete aa52bb7c3b68: Pull complete 3e7cc794a076: Pull complete 2d0705e20cf6: Pull complete b045e0784509: Pull complete 00f67e6eec07: Pull complete 0787eb7b6395: Pull complete facbec8fbb3f: Pull complete 083ba8b0454a: Pull complete 1593ddda9d91: Pull complete Creating logstash ... done Creating odfe-node1 ... done Creating odfe-kibana ... done
//查看已启动的镜像
[root@localhost elk]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 668ca4ec9965 amazon/opendistro-for-elasticsearch-kibana:1.12.0 "/usr/local/bin/kiba…" 9 minutes ago Up 8 minutes 0.0.0.0:5601->5601/tcp, :::5601->5601/tcp odfe-kibana dcd31cbe873a amazon/opendistro-for-elasticsearch:1.12.0 "/usr/local/bin/dock…" 9 minutes ago Up 8 minutes 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp, 0.0.0.0:9600->9600/tcp, :::9600->9600/tcp, 9650/tcp odfe-node1 8fdbd0d142dd leviocil/logstash-oss:6.7.1 "/usr/local/bin/dock…" 9 minutes ago Up 8 minutes 0.0.0.0:4560->4560/tcp, :::4560->4560/tcp, 0.0.0.0:5044->5044/tcp, :::5044->5044/tcp, 9600/tcp logstash 321b16217481 foxiswho/rocketmq:broker-4.5.2 "/bin/bash mqbroker …" 20 minutes ago Up 20 minutes 0.0.0.0:10909->10909/tcp, :::10909->10909/tcp, 9876/tcp, 10912/tcp, 0.0.0.0:10911->10911/tcp, :::10911->10911/tcp rmqbroker 0a3ab5eaf08a styletang/rocketmq-console-ng "sh -c 'java $JAVA_O…" 20 minutes ago Up 20 minutes 0.0.0.0:8180->8080/tcp, :::8180->8080/tcp rmqconsole b8b816721327 foxiswho/rocketmq:server-4.5.2 "/bin/sh -c 'cd ${RO…" 20 minutes ago Up 20 minutes 10909/tcp, 0.0.0.0:9876->9876/tcp, :::9876->9876/tcp, 10911-10912/tcp
标签:4.5,Pull,complete,elk,中间件,tcp,docker,rocketmq,搭建 From: https://www.cnblogs.com/Amos-Turing/p/16869191.html