2024.8.26(线上考试系统的数据 虚拟化部署 --link)

一、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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值