I want to test out an NFS server on an Ubuntu laptop. I'm starting with [1] . downloading It took a while to connect to a mirror, but I eventually downloaded nfs-utils-1.3.3.tar.gz installing My first attempt at configuring stopped quickly. I didn't have gawk, but mawk was substituted. But configure ended with this error: configure:3269: checking for C compiler default output file name
configure:3296: gcc conftest.c >&5 /usr/bin/ld: crt1.o: No such file: No such file or directory collect2: ld returned 1 exit status configure:3344: error: C compiler cannot create executables A quick search told me that crtl.o is part of libc6-dev. So I used apt-get for the library and tried again. Next I encountered checking for libwrap... configure: error: *** libwrap missing So I found libwrap is Wietse Venema's TCP Wrapper library. I tried compiling what I found at his webpage, but ran into errors, so I started to look for a package. I found libwrap0-dev at http://packages.debian.org/sarge/libwrap0-dev , but found this depended on libwrap0. I found it at http://packages.debian.org/sarge/libwrap0 . I used dpkg --install libwrap0_7.6.dbs-8_i386.deb and it finished without errors. Next I got another error: checking for event_dispatch in -levent... no configure: error: libevent needed for nfsv4 support I got libevent from http://www.monkey.org/~provos/libevent/ and it built smoothly. Anyway, I found out the name of the Debian client nfs package was nfs-common and the server package was nfs-kernel-server so I was able to get the remaining libraries with $ apt-get install nfs-common nfs-kernel-server What a relief, maybe now I can start to actually configure NFS. Note to self, look for what the package is called at the beginning to avoid the tedious hunt for dependencies. I used to think you learn so much from hunting down all those tarballs and building them from scratch, but the process is really standardized and there's no educational value, it's just mundane hunting work. All you get is to possibly find out how various libraries have been licensed as well as a few interesting small library websites. That's about it. So I got those packages... Configuration Another useful help page was http://www.debianadmin.com/network-file-system-nfs-server-and-client-configuration-in-debian.html . So next, /etc/exports,
/etc/hosts.allow, and /etc/hosts.deny should be configured, according to [1].Testing I was able to mount a directory from the laptop itself, but then I tried to mount from a macbook. Before adding the macbook's IP 192.168.2.2 to /etc/export , when mounting I got this error: $ sudo mount 192.168.2.5:/srv/ /Volumes/srv/ Password: NFS Portmap: RPC: Program not registered Then after adding its IP to /etc/export and /etc/hosts.allow, I got this one: $ sudo mount 192.168.2.5:/srv/ /Volumes/srv/ mount_nfs: bad MNT RPC: RPC: Authentication error; why = Failed (unspecified error) And for kicks, this is what happens when the Ubuntu NFS server is unplugged from the network. Actually nothing happens, the client just stalls. Well after a while there's this: NFS Portmap: RPC: Port mapper failure - RPC: Timed out And by the way, portmap is not running on the macbook. That could be a possible problem? Well when I tried to start portmap on the macbook, I got a mesasge as if it gets started on its own by launchd ( Mac OS X 's xinetd equivalent and tehn some ) on demand: $ sudo /usr/sbin/portmap portmap[1257]: PID 1228 started this second instance of portmap (the first instance may not be running, as it launches on demand via launchd), exiting! So, References [1] http://nfs.sourceforge.net/nfs-howto/ [2] http://www.debianadmin.com/network-file-system-nfs-server-and-client-configuration-in-debian.html |