亿级高并发电商项目-- 实战篇 --万达商城项目 二(ZookeeperDockerDubbo-Admin等搭建工作
Posted 童小纯
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了亿级高并发电商项目-- 实战篇 --万达商城项目 二(ZookeeperDockerDubbo-Admin等搭建工作相关的知识,希望对你有一定的参考价值。
👏作者简介:大家好,我是小童,Java开发工程师,CSDN博客博主,Java领域新星创作者
📕系列专栏:前端、Java、Java中间件大全、微信小程序、微信支付、若依框架、Spring全家桶
📧如果文章知识点有错误的地方,请指正!和大家一起学习,一起进步👀
🔥如果感觉博主的文章还不错的话,请👍三连支持👍一下博主哦
🍂博主正在努力完成2023计划中:以梦为马,扬帆起航,2023追梦人
安装Zookeeper
1、使用VMWare创建一台新的系统为 centos7.5 虚拟机,使用XShell连接虚拟机
2、关闭防火墙
#关闭防火墙: systemctl stop firewalld.service #禁止防火墙自启动: systemctl disable firewalld.service
3、安装Docker
# 安装Docker rm -f /var/run/yum.pid yum install docker-ce -y # 启动docker systemctl start docker
4、下载Zookeeper镜像
docker pull zookeeper:3.5.9
[root@localhost ~]# systemctl start docker [root@localhost ~]# docker pull zookeeper:3.5.9 3.5.9: Pulling from library/zookeeper 1efc276f4ff9: Pull complete a2f2f93da482: Pull complete 12cca292b13c: Pull complete d73cf48caaac: Pull complete c7b4dda8479e: Pull complete 459395fed1a2: Pull complete 28824857824a: Pull complete 88e1d1225794: Pull complete Digest: sha256:92ca5cc2c77c69a8b37cdc9de126f004c47614801e41a697bdf9c1a8b509bedf Status: Downloaded newer image for zookeeper:3.5.9 docker.io/library/zookeeper:3.5.9
查看是不是下载成功
docker images
[root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE zookeeper 3.5.9 ffab4e2a1c6f 6 months ago 265MB
5、启动Zookeeper容器
docker run --name zk -d -p 2181:2181 zookeeper:3.5.9
安装Dubbo-Admin
1、下载Dubbo-Admin镜像
docker pull docker.io/apache/dubbo-admin
[root@localhost ~]# docker pull docker.io/apache/dubbo-admin
Using default tag: latest
latest: Pulling from apache/dubbo-admin
4c25b3090c26: Pull complete
1acf565088aa: Pull complete
b95c0dd0dc0d: Pull complete
d25bb2549fe9: Pull complete
548d32f71092: Pull complete
dca843ed1d58: Pull complete
810d2a38c69c: Pull complete
3bb45425d4b1: Pull complete
8f1390143d9b: Pull complete
Digest: sha256:ad6b590b388595f3163156b3f6beecccb4acc6f568933aff2e93327096cd9959
Status: Downloaded newer image for apache/dubbo-admin:latest
docker.io/apache/dubbo-admin:latest
2、启动运行容器
docker run -d --name dubbo-admin -p
9600:8080 -e
admin.registry.address=zookeeper://192.168
.0.159:2181 -e admin.configcenter=zookeeper://192.168.0.159:2181 -e
admin.metadatareport.address=zookeeper://192.168.0.159:2
181 --restart=always
docker.io/apache/dubbo-admin
[root@localhost ~]# docker run -d --name dubbo-admin -p 9600:8080 -e admin.registry.address=zookeeper://192.168.100.130:2181 -e admin.config-center=zookeeper://192.168.100.130:2181 -e admin.metadata-report.address=zookeeper://192.168.100.130:2181 --restart=always docker.io/apache/dubbo-admin
3、浏览器输入 http://ip地址:9600 访问Dubbo-Admin,用户名 root 密码 root
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
48a5a7a8459a apache/dubbo-admin "tini -- /usr/local/…" About a minute ago Up About a minute 0.0.0.0:9600->8080/tcp, :::9600->8080/tcp dubbo-admin
143a332b251a zookeeper:3.5.9 "/docker-entrypoint.…" 13 minutes ago Up 13 minutes 2888/tcp, 3888/tcp, 0.0.0.0:2181->2181/tcp, :::2181->2181/tcp, 8080/tcp zk
以上是关于亿级高并发电商项目-- 实战篇 --万达商城项目 二(ZookeeperDockerDubbo-Admin等搭建工作的主要内容,如果未能解决你的问题,请参考以下文章
亿级高并发电商项目-- 实战篇 --万达商城项目 十(安装与配置Elasticsearch和kibana编写搜索功能向ES同步数据库商品数据)
亿级高并发电商项目-- 实战篇 --万达商城项目 二(ZookeeperDockerDubbo-Admin等搭建工作