On the server
- Make directory that you want to use.
- # mkdir /home/sharing
- Edit /etc/exports, insert the client machine's ip
- # vi /etc/exports
- Add this line:
- /home/sharing 192.168.0.3/255.255.255.255(rw,sync)
- Save
- Edit /etc/hosts.allow
- # vi /etc/hosts.allow
- Add this line:
portmap: 192.168.0.0/255.255.255.0
- Save
- Start nfs and portmap
- # /etc/init.d /nfs start
- # /etc/init.d/portmap start
- Start portmap
- # /etc/init.d/portmap start
- Mount the nfs folder
- # mount 192.168.0.1:/home/sharing /mnt
- Check /var/log/messages for any error that might occur
- # tailf /var/log/messages
- Use mount to check if the folder is mounted properly
- # mount
- This should be the output:
- 192.168.0.1:/home/sharing on /mnt type nfs (rw,addr=192.168.0.1)
- Edit /etc/fstab to mount the shared folder on boot
- # vi /etc/fstab
- Add this line
- 192.168.0.1:/mnt/sdb1/backup /mnt nfs rw,hard,intr 0 0
- Save
No comments:
Post a Comment