配置本地apt源失败后,选择配置为国内apt源(在可以连到公网的情况下进行)
ps:使用外网源前需增加dns配置
vi /etc/resolv.conf
nameserver x.x.x.x
nameserver x.x.x.x
建议先备份原来的源
mv /etc/apt/sources.list /etc/apt/sources.list.bak
那么下面开始配置吧~
vim /etc/apt/sources.list.d/local.list //编辑apt源
添加以下条目
deb [https://mirrors.aliyun.com/debian](https://links.jianshu.com/go?to=https%3A%2F%2Fmirrors.aliyun.com%2Fdebian) stable main contrib non-free
sudo apt-get update //更新软件列表
![](https://img.haomeiwen.com/i15240512/b5b33080b1c54bcb.png)
安装NFS 服务
apt install nfs-kernel-server
验证RPC服务
rpcinfo
NFS 的配置文件
/etc/exports
文件格式—— <输出目录> [客户端1 选项(访问权限,用户映射,其他)]
[客户端2 选项(访问权限,用户映射,其他)]
rw:设置输出目录读写;
sync:将数据同步写入内存缓冲区与磁盘中,效率低,但可以保证数据的一致性;
no_root_squash:root用户具有对nfs根目录的完全管理访问权限;
查看服务器上的共享目录
showmount -e
网友评论