最近收了HostHatch的大盘鸡+大流量鸡组合,记录一下挂载过程
2台机器先安装nfs
Debian&Ununtu:
1 |
sudo apt install nfs-kernel-server |
CentOS:
1 2 3 4 5 6 7 8 9 |
yum install nfs-utils 服务端配置: systemctl enable rpcbind systemctl enable nfs systemctl start rpcbind systemctl start nfs 客户端配置: systemctl enable rpcbind systemctl start rpcbind |
ifconfig查看内网IP
比如服务端(大盘机)IP为: 1.1.1.1
比如客户端(大流量机)IP为:2.2.2.2
服务端文件/etc/exports添加设置:
1 |
/home 2.2.2.2(rw,no_root_squash,no_subtree_check,sync) |
/homet为分享目录
重启nfs服务生效
1 |
sudo service nfs-kernel-server restart |
服务端完成!
接下来客户端:
1 |
sudo mount -t nfs4 -o proto=tcp,port=2049 1.1.1.1:/home /www/wwwroot |
/www/wwwroot为挂载目录
/etc/fstab文件添加设置:
1 |
1.1.1.1:/home /www/wwwroot nfs4 _netdev,auto 0 0 |
完成!
使用mount或者df -h命令查看挂载情况

原创文章,作者:discovery,如若转载,请注明出处:https://www.pingzz.com/jiaocheng/xitong/344.html