docker部署confluence企业知识库

网友投稿 1064 2022-09-16

docker部署confluence企业知识库

docker部署confluence企业知识库

实验环境

cat /etc/redhat-release && uname -a

CentOS Linux release 7.8.2003 (Core)

Linux centos7-1 3.10.0-1127.el7.x86_64

systemctl stop firewalld && systemctl disable firewalld

echo SELINUX=disabled > /etc/sysconfig/selinux

cp -pv /etc/sysctl.conf /etc/sysctl.conf.bak

echo net.ipv4.tcp_syncookies = 1 >> /etc/sysctl.conf

echo net.ipv4.tcp_tw_reuse = 1 >> /etc/sysctl.conf

echo net.ipv4.tcp_tw_recycle = 1 >> /etc/sysctl.conf

echo net.ipv4.tcp_fin_timeout = 10 >> /etc/sysctl.conf

echo net.ipv4.ip_forward = 1  >> /etc/sysctl.conf

sysctl -p

软件安装

yum install -y   yum-utils  docker-ce docker-ce-cli containerd.io

systemctl daemon-reload

systemctl start docker && systemctl enable docker

docker --version

Docker version 18.06.2-ce, build 6d37f41

mkdir -pv /usr/local/mysql && mkdir -pv  /usr/local/mysql/{data,log}

docker pull mysql:5.7

docker run -itd -p 3306:3306 --restart=always --user root:root \

-e MYSQL_ROOT_PASSWORD=root  \

-v /usr/local/mysql/data:/var/lib/mysql   \

-v /usr/local/mysql/log:/var/log/mysql/log  \

--name mysql mysql:5.7

docker exec -it mysql /bin/bash

mysql -uroot -p数据库权限

root@2fd175c791c2:/# mysql -uconfluence -pconfluence

mysql> CREATE DATABASE jira CHARACTER SET utf8mb4 COLLATE utf8_bin;

mysql> grant all privileges on *.* to confluence@'%' identified by 'confluence';

mysql> flush privileges;

mysql> ALTER DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;

mysql> SET GLOBAL tx_isolation='READ-COMMITTED';

mysql> select u.id, u.user_name, u.active from cwd_user u join cwd_membership m on u.id=m.child_user_id join cwd_group g on m.parent_id=g.id join cwd_directory d on d.id=g.directory_id where g.group_name = 'confluence-administrators' and d.directory_name='Confluence Internal Directory';

+--------+-----------+--------+

| id     | user_name | active |

+--------+-----------+--------+

| 262145 | admin     | T      |

+--------+-----------+--------+

mysql> update cwd_user set credential = 'x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==' where id=262145;

重置管理员权限

docker pull  blacklabelops/confluence

docker run -itd -p 8091:8090

--restart=always  --user root:root

--name confluence  blacklabelops/confluence

netstat -tuplna | grep LISTEN

tcp        0      0 0.0.0.0:8091     0.0.0.0:*     LISTEN      1647/docker-proxy

tcp6       0      0 :::8091       :::*              LISTEN      1653/docker-proxy

​​save blacklabelops/confluence > /root/confluence_images.tar.gz  备份镜像

docker load < /root/confluence_images.tar.gz                           还原镜像

docker export -o confluence-`date +%Y%m%d`.tar.gz confluence           备份运行容器

docker import  confluence-20211227.tar.gz   confluence                 恢复备份容器

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:软件APP开发搭建用海外服务器需要备案吗
下一篇:C# Log4Net学习笔记:记录日志到文件(c反应蛋白高说明什么)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~