1.规划网络的拓扑图
2.准备机器,安装软件,并开启服务
1.准备6台linux centos7.9的服务器
2.安装nfs并开启服务
a>下载nfs服务
[root@localhost ~] yum install nfs-utils -y
b>开启nfs服务
[root@localhost ~] service nfs-server start
Redirecting to /bin/systemctl start nfs-server.service
c>建立需要挂载的目录并授权
[root@localhost ~] mkdir /web
[root@localhost ~] chmod 777 /web
[root@localhost ~] ll -d /web
drwxrwxrwx. 2 root root 6 8月 17 15:27 /web
d>使用exportfs导出目录,无需重启nfs服务
[root@localhost ~b] exportfs -v
/web 192.168.174.0/24(rw,all_squash,sync)
3.3台使用yum安装docker 1.13的版本,设置并开启swarm集群
a>选择manager节点,配置host文件,添加ip和域名的对应记录
[root@manager1 ~] c