LFS-Hint -> NFS on LFS

Ian Chilton ian at ichilton.co.uk
Mon Oct 16 05:55:53 PDT 2000


OK...I got round to it  :-)

TITLE: Running an NFS Server on LFS
AUTHOR: Ian Chilton <ian at ichilton.co.uk>

** This is just a quick guide to compiling the required packages on LFS and is not intended as a full guide to NFS. Readers should also read the NFS-HOWTO at http://www.linuxdoc.org **

Download the following files from: ftp://ftp.slackware.com/pub/slackware/slackware_source/n/tcpip1/


Then, we have to compile the stuff..

tar xzvf nfs-server-2.2beta47.tar.gz
cd nfs-server-2.2beta47
strip rpc.mountd rpc.nfsd showmount
cp rpc.mountd /usr/sbin/rpc.mountd
cp rpc.nfsd /usr/sbin
cp showmount /usr/sbin
cat exports.man | gzip -9c > /usr/man/man5/exports.5.gz
for page in mountd.man nfsd.man showmount.man ; do
  cat $page | gzip -9c > /usr/man/man8/`basename $page .man`.8.gz

cd ..

tar xzvf tcp_wrappers_7.6.tar.gz
cd tcp_wrappers_7.6
patch -p1 --backup < ../tcp_wrappers_7.6.diff
make REAL_DAEMON_DIR=/usr/sbin linux
strip tcpd safe_finger tcpdchk tcpdmatch try-from
cp libwrap.a /usr/lib
cp tcpd.h /usr/include
cp safe_finger /usr/sbin
cp tcpd /usr/sbin
cp tcpdchk /usr/sbin
cp tcpdmatch /usr/sbin
cp try-from /usr/sbin
cp hosts_access.3 | gzip -9c > /usr/man/man3/hosts_access.3.gz
cp hosts_access.5 | gzip -9c > /usr/man/man5/hosts_access.5.gz
cp hosts_options.5 | gzip -9c > /usr/man/man5/hosts_options.5.gz
cat tcpd.8 | gzip -9c > /usr/man/man8/tcpd.8.gz
cat tcpdchk.8 | gzip -9c > /usr/man/man8/tcpdchk.8.gz
cat tcpdmatch.8 | gzip -9c > /usr/man/man8/tcpdmatch.8.gz

cd ..

tar xzvf portmap_5beta.tar.gz
cd portmap_5beta
patch -p1 --backup < ../portmap_5beta.diff
make USE_GLIBC=1
strip portmap pmap_dump pmap_set
cp portmap /sbin
cp pmap_dump /usr/sbin/
cp pmap_set /usr/sbin/
cat portmap.8 | gzip -9c > /usr/man/man8/portmap.8.gz

Now we need to create /etc/exports, containing the directories we want to 'share'.
For example, if we want the machine with the IP to share the directory /export/public, then use this in /etc/exports:


Then, all we need to do, is start it all up:


Then, go to the machine and type:

mount <share> <mountpoint>

But, replace <share> with <server>:<dir>, eg: fred:/export/public, or
replace <mountpoint> with a direcory, like /mnt

Hope this helps..

Bye for Now,


                                (o o)
 |  Ian Chilton     (IRC Nick - GadgetMan)     ian at ichilton.co.uk  |
 |  Backup E-Mail -->  ian at ichilton.dhis.org      ICQ #: 16007717  |
 |  Web Site      -->  http://www.ichilton.co.uk                   |
 |  "Unix is user friendly - it's just picky about it's friends."  |

Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list