1) On linux:
sudo /sbin/chkconfig --level 345 nfs-server on
sudo /sbin/service nfs-server start
system-config-nfs
When the GUI pops up, add in your directory that you'd like to share, and the IP addresses (e.g. your Windows 7 IP address) you'd like to share your directory with.
2) Still on linux, edit the /etc/exports file, and change the following line:
(rw,sync)
to
(rw,sync,all_squash,anonuid=12345,anongid=23456)
where 12345 is your linux uid and 23456 is your linux gid.
That will make files written to your nfs server from anonymous client be owned by the specified uid and gid.
3) On linux, perform a
/sbin/service nfs-server restart
You can also perform the following, to confirm the directories shared:
sudo /usr/sbin/exportfs
4) On Windows 7, go to Control Panel > Programs and Features > Turn Windows features on or off
Check all three checkboxes under Services for NFS. Optionally turn on Telnet Client if you'd like to test out your NFS connection over port 111 (telnet linuxServerHostname 111)
5) Windows-R (run) > \\linuxServerHostname\path\to\nfs\mountname
If all goes well, that will just magically work.
6) (Optional) To mount the nfs server to a Windows drive, you can perform the following on the command line:
mount \\linuxServerHostname\path\to\nfs\mountname z:
And to unmount, either:
umount -a
or
umount z:
Easy. Well... at least, not too bad.
No comments:
Post a Comment