实验环境
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
cat >> /etc/sysctl.conf << EOF
> net.ipv4.tcp_syncookies = 1
> net.ipv4.tcp_tw_reuse = 1
> net.ipv4.tcp_tw_recycle = 1
> net.ipv4.tcp_fin_timeout = 10
> net.ipv4.ip_forward= 1
> EOF && sysctl -p
软件安装
yum install -y yum-utils docker-ce-18.06.3.ce
systemctl daemon-reload
systemctl start docker && systemctl enable docker
docker --version
Docker version 18.06.2-ce, build 6d37f41
docker pull mysql:5.7
docker pull cptactionhank/atlassian-jira-software:8.1.0
docker run -itd --name mysql -p 3306:3306 \
--restart=always --privileged=true \
-e MYSQL_ROOT_PASSWORD=root \
-v /usr/local/mysql/data:/var/lib/mysql \
-v /usr/local/mysql/log:/var/log/mysql/log \
mysql:5.7
docker exec -it 2fd175c791c2 /bin/bash
mysql -uroot -proot
mysql> CREATE DATABASE jira CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
mysql> grant all privileges on *.* to jira@'%' identified by 'jira';
mysql> flush privileges;
root@2fd175c791c2:/# mysql -ujira -pjira
mysql>
docker run -itd --name jira -p 8081:8080 \
--restart=always --privileged=true \
-v /usr/local/jira:/usr/local/jira \
-v /etc/localtime:/etc/localtime:ro \
cptactionhank/atlassian-jira-software:8.1.0 \
docker exec -it 683bd7756ae7 /bin/bash 进入容器
docker cp atlassian-extras-3.2.jar 683bd7756ae7:/opt/atlassian/jira/atlassian-jira/WEB-INF/lib 解除用户限制
docker restart 683bd7756ae 重启容器
docker ps | grep mysql
2fd175c791c2 mysql:5.7 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp mysql
http://服务器ip:8081
免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删