一、mysql镜像管理
1、线上考试系统的数据 虚拟化部署
1. 部署前端服务器
(1)将资源上传到服务器
scp -r /dist/ root@xxx:…..
(2)创建基础容器 在服务器上
[root@docker ~]# systemctl start docker
[root@docker ~]# docker pull centos[root@docker ~]# docker run -it --name c0 centos:latest /bin/bash
[root@015996a52240 /]# cat /etc/redhat-release
CentOS Linux release 8.4.2105
(3)在容器中修改yum源
[root@015996a52240 /]# rm -rf /etc/yum.repos.d/*
[root@015996a52240 /]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo[root@015996a52240 /]# yum clean all && yum makecache
(4)在容器中安装epel
[root@015996a52240 /]# yum -y install epel-release
(5)在容器中安装nginx
[root@015996a52240 /]# yum -y install nginx
(6)ctrl+p+q
(7)导出tar包
[root@docker ~]# docker export -o centos_nginx c0
[root@docker ~]# ls
(8)引入tar包,称为镜像
[root@docker ~]# docker import -m "哈哈哈哈" cen