How to manage Zentao based on docker

How to manage Zen Tao based on docker? Today I will take a look with my friends.

Run

First of all, in order to facilitate later maintenance, we prepared the following docekr container instance running script for everyone.

docker run -d --restart always -p 80:80 -p 3306:3306 \
        -e ADMINER_USER="root" -e ADMINER_PASSWD="password" \
        -e BIND_ADDRESS="false" \
        -v /data/docker/zentao/:/opt/zbox/ \
        --add-host smtp.exmail.qq.com:163.177.90.125 \
        --name zentao-server \
        idoop/zentao:latest

In the above startup script, we mount the directory /opt/zbox/ in the container named zentao to the /data/zentao/ directory of the host machine.Therefore, we need to create the directory in advance on the host machine.Create the directory with the following command.

mkdir -p  /data/zentao/

In the above zentao docker container running script, we used some parameters, so what are these parameters used for, and where did they come from? I guess many friends may be a little confused. These parameters are found from the official link of zentao on docker hub, click here to enter the official website. The following picture was taken by Zentao official on the docker hub. We can see what parameters are there and what their role is.

After completing the above work, execute the above docker container running script to start a container instance named zentao.

Firewall

The zentao instance is running, but we still cannot connect from other hosts. In order to connect to the service corresponding to the container from other hosts, we need to add the corresponding port number involved in the container to the white list through the firewall command.We use the following command to add ports to the firewall whitelist.

[root@xtwj77 ~]# firewall-cmd --permanent --zone=public --add-port=80/tcp
success
[root@xtwj77 ~]# firewall-cmd --reload
success
[root@xtwj77 ~]# firewall-cmd --zone=public --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: eth0
  sources: 
  services: dhcpv6-client ssh
  ports: 80/tcp 3306/tcp
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 
	
[root@xtwj77 ~]# docker ps -a
CONTAINER ID        IMAGE                 COMMAND               CREATED             STATUS                   PORTS                                        NAMES
e64eb3d05f07        idoop/zentao:latest   "docker-entrypoint"   7 minutes ago       Up 7 minutes (healthy)   0.0.0.0:80->80/tcp, 0.0.0.0:3306->3306/tcp   zentao-server
[root@xtwj77 ~]

After completing the above work, we can visit the zentao service normally.

Open the browser and enter the URL http: // 192.168.3.77 / zentao / in the address bar of the browser. We can enter the login page of the Zen Tao system. For the first login, the user uses admin and the password uses 123456. , The password needs to be changed after successful login.

Maintain

  In actual work, we always need to maintain the zentao system, and backup and recovery is an important part of the maintenance work. Next, I will introduce you to the backup and recovery of zentao in the docker environment, as shown in the following figure.

在这里插入图片描述
  For ZenTao, we can use “Background”-> “Data”-> “Backup” to generate the state data of the system before migration, and transfer the relevant data to the corresponding location on the target host through file transfer Select “Restore” to complete the system migration.

References

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

qwfys200

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值