文章目录
- 安装准备
- 安装
安装准备
1.安装好docker和dockercompose:
docker、docker-compose安装教程,很详细
2.上传好安装相关文件
安装
使用以下命令导入管理端镜像和运行时镜像
docker load -i tongesb_manage_7100.tar
docker load -i tongesb_server_7100.tar
查看是否导入成功:
docker images | grep tongesb
修改docker-compose.yml文件
以下是原文件内容:
name: tongesb_7100
services:
tongesb_manage_7100:
image: tongesb_manage:7.1.0.0
container_name: tongesb_manage_7100
restart: always
networks:
- tongesb_network
ports:
- 18080:8080
- 25600:15600
volumes:
- tongesb_manage_config:/tong/TongESB7/Manage/config
- tongesb_manage_log:/tong/TongESB7/Manage/log
- tongesb_am_config:/tong/TongESB7/Manage/AccessManager/config
- tongesb_am_log:/tong/TongESB7/Manage/AccessManager/logs
- tongesb_redis:/tong/TongESB7/redis-linux
- /paht/to/license.dat:/tong/TongESB7/Manage/AccessManager/license.dat:rw
tongesb_server_7100:
image: tongesb_server:7.1.0.0
container_name: tongesb_server_7100
restart: always
networks:
- tongesb_network
depends_on:
- tongesb_manage_7100
environment:
- IS_REDIS_IP=tongesb_manage_7100
- IS_SERVER_IP_ADDR=10.10.83.121
ports:
- 19602:19602
- 8185:8185
- 8195:8195
- 9999:9999
- 5555:5555
volumes:
- tongesb_server_config:/tong/TongESB7/Server/config
- tongesb_server_log:/tong/TongESB7/Server/log
- tongesb_httpproxy_config:/tong/TongESB7/Server/httpProxy/config
- tongesb_httpproxy_log:/tong/TongESB7/Server/httpProxy/log
volumes:
tongesb_manage_config:
tongesb_manage_log:
tongesb_am_config:
tongesb_am_log:
tongesb_redis:
tongesb_server_config:
tongesb_server_log:
tongesb_httpproxy_config:
tongesb_httpproxy_log:
networks:
tongesb_network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.97.0.0/24
需要改动的地方有两处:
在docker-compose.yml文件所在目录,执行以下命令,创建容器启动管理端和运行时:
docker compose up -d
执行完后,使用以下指令查看是否创建成功
docker ps | grep tongesb
另外下面的是常用指令
docker compose stop 停止容器,不会删除容器
docker compose start 启动已有容器
docker compose down 停止容器并删除容器
docker compose logs 查看容器启动日志
docker exec -it container_name /bin/bash 进入容器内部
docker volume ls 查看数据卷
docker volume inspect volume_name 查看数据卷详情
确认安装无误后,等一段时间,直接访问http://服务器ip:18080/console
根据提示修改密码后进入“运维”->“集群管理”菜单,点击默认集群的“编辑”,查看运行时启动状态,如果可以看到一个状态为“启动”的运行时,则表示启动成功。