前提1.永久关闭SELinux
编辑/etc/selinux/config,找到SELINUX 行修改成为:SELINUX=disabled:
前提2. systemctl disable firewalld.service
永久关闭防火墙。
1、编辑/etc/exports
/nfs *(rw,sync,no_root_squash)
2、创建目录/nfs
mkdir /nfs
3、查看nfs状态
systemctl status nfs-server.service
4、启动nfs
systemctl start nfs-server.service
5、设置开机启动
systemctl enable nfs-server.service
6、配置完成,可以使用其他虚拟机mount 到 本虚拟机的/nfs 下了。
mount -t nfs -o nolock 192.168.9.67:/nfs /var/tmp/
本文详细介绍了如何在Linux系统上配置NFS服务,包括永久关闭SELinux和防火墙、编辑配置文件、创建共享目录、启动及设置NFS服务开机启动等步骤,并提供了从其他机器挂载NFS共享目录的方法。
1973

被折叠的 条评论
为什么被折叠?



