1. 可以在 windows 下编辑各种文件,比如 yaml、sh 脚本,然后在 linux 下进行测试使用。

1. Linux (Centos8)部署 NFS 服务器

// 安装 NFS 服务,手工执行命令的方式

# 共享目录
NFS_DIR="/data/nfs/public"
# 可以访问共享目录的网段
NFS_ACCESS_NET="192.168.10.0/24"

mkdir $NFS_DIR -pv
chmod -R 777 $NFS_DIR

yum -y install rpcbind nfs-utils
cat > /etc/exports <<EOF
$NFS_DIR $NFS_ACCESS_NET(rw,sync,all_squash)
EOF

## 启动服务
systemctl restart rpcbind && systemctl enable rpcbind
systemctl start nfs-server && systemctl enable nfs-server

## 客户端测试挂载
# showmount -e NFS_SERVER_IP
# mount -t nfs NFS_SERVER_IP:NFS_DIR /mnt/nfs/public

// 一条命令部署

$ source <(curl -sL https://gitee.com/jack_zang/public-scripts/raw/master/shell/nfs/nfs-install-centos8.sh)

2. windows 挂载 NFS

//开启 nfs 客户端

// 选择映射网络驱动器

// 填写 NFS 服务器地址和共享目录