Install nfs server:
[command]
sudo apt-get install nfs-kernel-server nfs-common
mkdir /home/hubert/workspace
chmod -R 777 /home/hubert/workspace/
vi /etc/exports
[modify]
/home/hubert/workspace 192.168.56.8(rw,sync,no_root_squash,no_all_squash)
# Please replace 192.168.56.8 with your own client IP address.
save, refresh, and restart nfs
[command]
sudo exportfs -r
sudo /etc/init.d/nfs-kernel-server restart
---------------------------------------------------------------
[command]
sudo apt-get install nfs-commom
mkdir -p /media/hostshare
test it manually, please replace 192.168.56.1 with your own host IP address.
[command]
mount -t nfs 192.168.56.1:/home/hubert/workspace /media/hostshare
auto mount nfs:
[command]
sudo vi /etc/fstab
[modify]
192.168.56.1:/home/hubert/workspace /media/hostshare nfs defaults 0 0
# Please replace 192.168.56.1 with your own host IP address.
save and restart your VM to check it works or not.
No comments:
Post a Comment