|
|
||
|
||
|
|
| Red Hat Documentation |
3. Setting up a NFS server3.1 PrerequisitesBefore you continue reading this HOWTO you will need to be able to telnet back and forth between the machine you're using as server and the client. If that does not work you need to check the networking/NET-3 HOWTO and set up networking properly.
3.2 First stepBefore we can do anything else we need a NFS server set up. If you're part of a department or university network there are likely numerous NFS servers already set up. If they will let you get access to them, or indeed, if you're reading this HOWTO to get access to one of them you obviously don't need to read this section and can just skip ahead to the section on setting up a NFS client
If you need to set up a non-Linux box as server you will have to read the system manual(s) to discover how to enable NFS serving and export of file systems through NFS. There is a separate section in this HOWTO on how to do it on many different systems. After you have figured all that out you can continue reading the next section of this HOWTO. Or read more of this section since some of the things I will say are relevant no matter what kind of machine you use as server.
If you're running please see the Linux 2.2 section before you continue reading this.
Those of you still reading will need to set up a number of programs.
3.3 The portmapperThe portmapper on Linux is called either
Start the portmapper. It's either called
Oh, one thing. Remote access to your portmapper is regulated by
the contents of your
3.4 Mountd and nfsdThe next programs we need running are mountd and nfsd. But first
we'll edit another file.
/mn/eris/local apollon(rw) The above line gives apollon read/write access to
Note: This exports file is not the same syntax that other Unixes
use. There is a separate section in this HOWTO about other Unixes
Now we're set to start mountd (or maybe it's called
If you edit
#!/bin/sh killall -HUP /usr/sbin/rpc.mountd killall -HUP /usr/sbin/rpc.nfsd echo re-exported file systems
Save it in, say,
Now you should check that mountd and nfsd are running properly.
First with
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100005 1 udp 745 mountd
100005 1 tcp 747 mountd
100003 2 udp 2049 nfs
100003 2 tcp 2049 nfs
As you see the portmapper has announced it's services, and so has mountd and nfsd.
If you get
After checking that the portmapper reports the services you can check with ps too. The portmapper will continue to report the services even after the programs that extend them have crashed. So a ps check can be smart if something seems broken.
Of course, you will need to modify your system rc files to start mountd and nfsd as well as the portmapper when you boot. It is very likely that the scripts already exist on your machine, you just have to uncomment the critical section or activate it for the correct init run levels.
Man pages you should be familiar with now: portmap, mountd, nfsd, and exports.
Well, if you did everything exactly like I said you should you're all set to start on the NFS client.
Next Previous Contents |
|
|