标签:共享 firewalld file bind eof tor har sys 本地
服务端 192.168.1.151.下载 nfs-utils和 rpcbindyum install -y nfs-utils rpcbind
2.启动rpcbind(必须先启动)systemctl start rpcbind
3.启动nfs-utilssystemctl start nfs
4.查看进程
ps aux | grep nfs
ps aux | grep rpcbind
5.设置开机自启动
systemctl enable rpcbind
systemctl enable nfs
6.查看自启情况systemctl list-unit-files --type=service|grep "enabled"|egrep "rpcbind|nfs"
7.创建目录mkdir /data
8.给权限chown -R nfsnobody.nfsnobody /data
9.配置共享目录
cat>>/etc/exports<<EOF
> #NFS server share directories
> /data 192.168.1.0/24(rw,sync)
> EOF
10.平滑重启nfssystemctl reload nfs
11.查看挂载目录showmount -e 192.168.1.158(服务端Ip)
12.关闭防火墙
systemctl stop firewalld
setenforce 0
13.给/data目录加权限chmod 777 /data
1.下载yum install nfs-utils rpcbind -y
2.启动rcpbind(不用启nfs)systemctl start rpcbind
3.设置开机自启动systemctl enable rpcbind
4.本地查看挂载目录showmount -e 192.168.1.158
5.设置开机自动挂载
mount -t nfs 192.168.1.158:/data /mnt
echo "mount -t nfs 192.168.1.158:/data /mnt">>/etc/rc.local
6.查看df -h
7.关闭防火墙
systemctl stop firewalld
setenforce 0
标签:共享 firewalld file bind eof tor har sys 本地
原文地址:https://blog.51cto.com/14375700/2427465