Docker build Zentao (Zen)

Zen There are many ways to build, refer to the official documentation to build, is presented here refer to the official documentation docker way to build.

Zen internal default will automatically install mysql database.

 

First, Download

Zen open source version:    http://dl.cnezsoft.com/zentao/docker/docker_zentao.zip

Database username: root, default password: 123456. Run-time, you can set MYSQL_ROOT_PASSWORD variable to change the password.

You can mount directory

/ App / zentaopms: Zen directory is the directory, which contains the code and accessories Zen upload directory.

/ Var / lib / mysql: the directory data directory database.

Second, install and use

Note: You need to close down selinux

1, the mirror Construction

Download the installation package, unzip. Enter docker_zentao directory, execute the command docker build -t [image name] [Dockerfile directory]

(May be downloaded to install the package on Windows, spread with xftp centos corresponding directory, and then execute the command to build the mirror:

  docker build -t zentao ./

After executing this command need to wait for the image creation is complete, the process takes a few minutes

 

2, run-time image

docker run --name [Container Name] -p [Host interface]: 80 -v [Host code directory]: / app / zentaopms -v [Host data directory]: / var / lib / mysql -e MYSQL_ROOT_PASSWORD = [password database ] -d [image name]: latest

E.g

Create / opt / zentao / www / opt / zentao / data directory.

Excuting an order:

docker run --name zentao -p 5000:80 -p 3301:3306 -v /opt/zentao/www:/app/zentaopms -v /opt/zentao/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d zentao:latest

 

Where 3301: 3306 port mapping not.

Run successfully.

 

3, mounting Zen

Browser to access http: // ip: 5000, the installation page displaying Zen, Zen installation. (5000 is the port mapping above)

Tips can be configured by page.

 

Third, the upgrade Zen

Refer to the official document: https://www.zentao.net/download/80098.html

 

Fourth, the command-line access to the database Zen

1, after the installation is successful, the confirmation ID container:

2, into the container docker:

Execute the following command, ID ID you can use the query above.

docker exec -it cc8f97cdf51b /bin/bash

result: 

3, to access the database:

The default password is 123456, but the run-time image when MYSQL_ROOT_PASSWORD change the password, then the need to change the password.

 

 

Fifth, remote database access Zen

Zen default only allow local access mysql.

If you require remote access, you can search online remote mysql connection configuration.

But not propose to amend, after many changes resulted in the loss of privileges, can not log on.

 

navicat access based on Zen docker build a database error "2003 can not connect to MySQL server on '' (10061 'unknown error')"

 

method:

1. Open the 3306 port mapping

2. Turn on remote access mysql

 Reference: https: //www.cnblogs.com/wujiecong/p/11543154.html

 

 

More detailed installation and upgrades refer to the official document:

https://www.zentao.net/download/80098.html

https://www.zentao.net/book/zentaopmshelp/c3.html

Guess you like

Origin www.cnblogs.com/panchanggui/p/12044135.html