# nfs **Repository Path**: caicunjun/nfs ## Basic Information - **Project Name**: nfs - **Description**: windows nfs server quick start - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-03-26 - **Last Updated**: 2024-03-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # nfs 环境搭建 ## 1.注册 ![](image/img_1.png) ## 2.设置路径 ![](image/img_2.png) ``` E:\caicunjun -public -name:caicunjun ``` ## 3.给 root 权限 ![](image/img_3.png) ## 4.挂载脚本 ```bash touch ~/xxx_mount_nfs.sh chmod 777 xxx_mount_nfs.sh ``` 内容如下 ```bash # !/bin/bash # 挂载 ${nfs_url} 到 ${dir} nfs_url="192.168.100.123:/caicunjun" dir="/mnt/caicunjun" if [ -d ${dir} ] then echo "目录 ${dir} 已存在" else echo "创建目录 ${dir}" mkdir ${dir} fi mount -t nfs -o nolock ${nfs_url} ${dir} ``` # ssh 免密登录 ## 1.生成 rsa 格式的密钥对 ```bash ssh-keygen -t rsa # 生成目录 # C:\Users\${username}\.ssh # eg: C:\Users\Administrator\.ssh ``` ![](image/img_4.png) ## 2.将公钥追加到 linux ```bash cd ~/.ssh # 上传 id_rsa.pub 略 # 把公钥的内容追加到 authorized_keys cat id_rsa.pub >> authorized_keys # 删除公钥 rm id_rsa.pub ``` ## 3.vscode 连接配置 remote-ssh 插件 ![](image/img_5.png) ![](image/img_6.png) ![](image/img_7.png) ![](image/img_8.png)