00:01
从第三章开始呢,们将会讲解MY色Q的主从同步,我们首先呢会搭建一个易主多从的配置,然后呢使用sheding fair JD bc以及she fair proxy去连接这样的一个主存服务器,那么这个主存服务器呢,我们会在docker环境下进行安装,所以这节课的任务呢是安装一个docker环境。那么。资料当中呢,给大家提供了一个docker环境安装的文档,这个文档当中一共有三个部分的内容,第一个呢是安装准备,第二个呢是OS7环境下的docker安装,第三个呢是docker的卸载,那么我们先来看一下安装准备。安装docker的前提呢,是你需要有一个Windows服务器,或者是Mac服务器,Sa OS服务器,乌班图啊等等这样的一些操作系统上都可以安装docker。那么我的服务器呢?是OS7,我安装在了虚拟机上。
01:03
所以如果你像我一样需要将docker安装在3S7上的话呢,要求你的系统必须是64位的,然后系统的内核呢,必须是3.10以上的。我们先用这种方式来查看一下系统的内核。我来打开一个X shell。啊,我连接这台201服务器。就是我现在要安装docker的服务器,然后呢,我们来啊,敲一个U命令。好,那这个呢,就是帮助我们查看你当前的散头S系统内核的一个命令,那如果满足这样的一个条件的话,3.10版本以上啊,就是3.10,然后呢,是64位的服务器就可以了,好然后接下来呢,我们看一下已安装的三头版本。用这个命令。
02:01
那你会发现呢,我安装的SANOS版本呢是7.4,所以呢满足我们docker安装的一个最基本的条件,接下来呢,我们就来在OS7上呢安装docker,那么安装docker之前呢,我们先安装docker需要依赖的啊一系列的软件包,我们把这个命令直接粘去就可以了。好,因为之前其实我已经安装过这些软件包了,所以呢啊,我这面的速度就比较快哈,如果你没有安装过的话呢,它可能要有一个具体的下载和安装的过程。然后接下来呢,我们就设置一下docker的下载镜像,那么docker默认情况下,它的官方下载镜像呢,在我们国内的这个服务器上下载会比较慢,所以呢,推荐大家去设置一个阿里云的下载地址,我们通过这个命令呢,去设置下载镜像,也是直接把它粘到我们的命令行当中。
03:13
好,我们配置完阿里云的下载镜像之后呢,啊,需要更新一下软件包的索引。那因为之前实际上所有的这些工作我都做过了啊,所以在我这个里面执行的速度呢,是比较快的,那你执行的话呢,可能要有一个具体的时间,要等待一会儿,好,那接下来呢,我们安装docker CE。那这个过程呢,我们需要稍微等一会儿。
04:04
它会进行docker的下载以及安装。好,那到这儿为止呢,只要你看到了完毕这样的两个字呢,就说明我们的docker已经成功的安装了,接下来呢,我们用system control start docker。来对docker服进行启动。好,现在呢,Docker已经启动起来了,我们可以用docker version来验证一下你安装的docker的版本,那么我们安装的docker的客户端的版本呢,是。19.03.8,然后我们安装的ER的服务的版本呢,是20.10.17,好,这个就大家看一下就行了啊,有了这个版本号的输出呢,就说明我们的docker呢已经安装成功了。
05:06
呃,如果你需要设置开机启动的话,那么我们可以通过下面这个方式来设置,那这个命令是查看docker目前为止是否默认是开机启动的。那你会发现它是默认情况下,如果你重启计算机的话呢,它是不会启动的,需要手工启动。我们可以通过这个方式呢来设置docker的开机启动。好,设置完成之后呢,我们要重新加载服务配置,这样的话呢,这个设置就会立即生效。好,那如果不需要开机启动的话,那就是下面这两行代码了,然后如果你需要卸载的话,就是下面的这一系列的操作。到此为止呢?Docker就在我们的Linux服务器上呢,安装成功了,那下一堂课呢,我们将在docker服务器上搭建一个MY的主从同步的服务。
我来说两句