
Linux中如何共享储存?有时候内网之前两个服务器需要相互的文件传输,为了简便文件传输方式,可以使用挂载形式,下面为大家详细讲解一下Linux下共享储存具体方法。
192.168.0.1 需要访问192.168.0.2的资源文件。
1.检查192.168.0.2上的nfs服务是否安装
rpm -pa|grep nfs
2. 如果未安装,进行安装。
yum -y install nfs
3. 安装了nfs,设置配置文件
vi /ect/exports
/mountfolder/test/ 192.168.0.1(rw,sync,no_root_squash)
4. 启动nfs
/ect/init.d/nfs start
5. 检查nfs是否启动成功
Service nfs status
6. 192.168.0.2上执行挂载命令
Mount -t nfs 192.168.0.1:/mountfolder/test /mountfolder/test
7. 查看挂载共享目录
mount -l
8. 取消挂载
umount -l /mountfolder/test
文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/219826.html<