Docker安装Yearning3.1.6/禅道18.8【亲测可用】

一、安装Yearning

1、建议先安装go

2、在mysql下新建yearning数据库:

进入mysql:docker exec -it 91ada9def680 /bin/bash

账号密码登录:mysql -uroot -p

create database if not exists yearning default character set utf8mb4 collate utf8mb4_general_ci;

3、创建单独的账号密码(在mysql里创建如下信息,注:不要使用mysql的root用户进行安装)

创建mysql用户:CREATE USER 'yearning'@'localhost' IDENTIFIED BY 'Newyearning55..';

创建远程登录用户:CREATE USER 'yearning'@'%' IDENTIFIED BY 'Newyearning55..';

更改用户加密规则:ALTER USER 'yearning'@'%' IDENTIFIED WITH mysql_native_password BY 'Newyearning55..';

授权用户远程登录权限:grant all on *.* to 'yearning'@'%';

刷新配置:FLUSH PRIVILEGES;

4、执行以下docker镜像运行命令(注意自己的端口、IP、mysql的账号和密码)

docker run -itd --name yearning --restart always -p 8000:8000 -e MYSQL_ADDR=192.168.13.128:3306 -e MYSQL_USER=yearning -e MYSQL_PASSWORD=Newyearning55.. -e MYSQL_DB=yearning zhangsean/yearning

INSERT INTO `core_accounts` (`username`,`password`,`department`,`real_name`,`email`,`is_recorder`,`query_password`) VALUES ('admin','pbkdf2_sha256$120000$zBsKAIdklVkR$PONEgTOLwSTL1mhmoXt3A+sN4GzdFIBGZSRtHe+yWhs=','DBA','超级管理员','',0,'')

INSERT INTO `core_global_configurations` (`authorization`,`ldap`,`message`,`other`,`stmt`,`audit_role`,`board`) VALUES ('global','{"url":"","user":"","password":"","type":"(\u0026(objectClass=organizationalPerson)(sAMAccountName=%s))","sc":"","ldaps":false,"map":"","test_user":"","test_password":""}','{"web_hook":"","host":"","port":25,"user":"","password":"","to_user":"","mail":false,"ding":false,"ssl":false,"push_type":false,"key":"","format":""}','{"limit":1000,"idc":["Aliyun","AWS"],"query":false,"register":false,"export":false,"ex_query_time":60}',0,'{"DMLAllowLimitSTMT":false,"DMLInsertColumns":false,"DMLMaxInsertRows":10,"DMLWhere":false,"DMLOrder":false,"DMLSelect":false,"DMLAllowInsertNull":false,"DMLInsertMustExplicitly":false,"DDLEnablePrimaryKey":false,"DDLCheckTableComment":false,"DDlCheckColumnComment":false,"DDLCheckColumnNullable":false,"DDLCheckColumnDefault":false,"DDLEnableAcrossDBRename":false,"DDLEnableAutoincrementInit":false,"DDLEnableAutoIncrement":false,"DDLEnableAutoincrementUnsigned":false,"DDLEnableDropTable":false,"DDLEnableDropDatabase":false,"DDLEnableNullIndexName":false,"DDLIndexNameSpec":false,"DDLMaxKeyParts":5,"DDLMaxKey":5,"DDLMaxCharLength":10,"MaxTableNameLen":10,"MaxAffectRows":1000,"MaxDDLAffectRows":0,"SupportCharset":"","SupportCollation":"","CheckIdentifier":false,"MustHaveColumns":"","DDLMultiToCommit":false,"DDLPrimaryKeyMust":false,"DDLAllowColumnType":false,"DDLImplicitTypeConversion":false,"DDLAllowPRINotInt":false,"DDLAllowMultiAlter":false,"DDLEnableForeignKey":false,"DDLTablePrefix":"","DDLColumnsMustHaveIndex":"","DDLAllowChangeColumnPosition":false,"DDLCheckFloatDouble":false,"IsOSC":false,"OSCExpr":"","OscSize":0,"AllowCreateView":false,"AllowCrateViewWithSelectStar":false,"AllowCreatePartition":false,"AllowSpecialType":false,"PRIRollBack":false}','')

INSERT INTO `core_graineds` (`username`,`group`) VALUES ('admin','["71757f41-09af-4a88-9ffd-d7a04d11eb43"]')

INSERT INTO `core_role_groups` (`name`,`permissions`,`group_id`) VALUES ('admin','{"ddl_source":[],"dml_source":[],"query_source":[]}','71757f41-09af-4a88-9ffd-d7a04d11eb43')

5、查看运行的docker yearning ID号 docker ps

6、设置自动启动:docker update --restart=always c86011bf6031

7、登录web进行管理:你自己的IP:8000进行访问

8、默认账号密码:admin/Yearning_admin

二、安装禅道

docker pull hub.zentao.net/app/zentao:18.8
docker run --name zentao -p 8081:80 -v /data/zentao:/data -e MYSQL_INTERNAL=true -d hub.zentao.net/app/zentao:18.8 --network=zentaonet
docker update --restart=always 1c7e8d110474
docker ps

1、创建zentao名称的数据库

2、访问:http://192.168.13.128:8081/

3、配置禅道:

1)IP地址不要写127.0.0.1也不要写localhost,可以直接写本地IP
2)用户名和密码均为数据库的用户名和密码

3)设置账号密码:root:123456

5)Prometheus下直接添加8081端口,然后重启Prometheus

4、问题

如果出现session权限问题,进入容器后找到相对应目录后给权限

docker exec -it /bin/bash

mkdir /var/lib/php/sessions

chmod 777 -R /var/lib/php/sessions

Docker安装Yearning3.1.6/禅道18.8【亲测可用】_第1张图片

你可能感兴趣的:(Linux,docker,数据库,容器)