target: when people view machine a ,it can load the data from folder in B automaticlly:
machine_A ( offer web service), machine_B ( data access service)
OS : ubuntu server
Step 1:
in machine B (hostname:data) : suao apt-get install nfs-kernel-server
sudo vi /etc/exports
add:
/var/share_folder_path web(ro) // share the folder /var/share_folder_path, allow the host web to access, privileges: R,O
step 2:
in machine A (hostname: web):
sudo apt-get install nfs-common
sudo vi /etc/fstab
add a new line like this :
data: /var/share_folder_path /var/share_folder_path nfs ro,soft 2 2
sudo mount -a // to check if there is something wrong.