如何利用mount命令将另外一个linux服务器上的目录挂在到本机?,mountlinux
文章由LinuxBoy分享于2019-04-03 08:04:21
如何利用mount命令将另外一个linux服务器上的目录挂在到本机?,mountlinux
你先要在192.168.1.100上开启NFS服务并编辑/etc/exports文件:
chkconfig --level 35 nfs on
service nfs start
vi /etc/exports,加入:
/tmp 192.168.1.200(rw,sync,no_root_squash)
然后,在192.168.1.200(如果你现在登录在192.168.1.100,当然要ssh登录到192.168.1.200,并su成root)运行:
mkdir /tmp
chmod 777 -R /tmp
mount 192.168.1.100:/tmp /tmp
就可以了。
把mount这行加入到/etc/rc.local,开机就会自动挂载了。
评论暂时关闭