Red Hat LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE Guida di Installazione Pagina 243

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 282
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 242
Chapter 18. Network File System (NFS) 243
However, be careful when using wildcards with fully qualified domain names, as they tend to be
more exact than you would expect. For example, the use of *.domain.com as wildcard will al-
low sales.domain.com to access the exported filesystem, but not bob.sales.domain.com. To match
both possibilities, as well as sam.corp.domain.com, you would have to provide *.domain.com
*.*.domain.com.
IP networks Allows the matching of hosts based on their IP addresses within a larger net-
work. For example, 192.168.0.0/28 will allow the first 16 IP addresses, from 192.168.0.0 to
192.168.0.15, to access the exported filesystem but not 192.168.0.16 and higher.
netgroups — Permits an NIS netgroup name, written as @
group-name , to be used. This effec-
tively puts the NIS server in charge of access control for this exported filesystem, where users can
be added and removed from an NIS group without affecting /etc/exports.
Warning
The way in which the /etc/exports file is formatted is very important, particularly concerning the
use of space characters. Remember to always separate exported filesystems from hosts and hosts
from one another with a space character. However, there should be no other space characters in the
file unless they are used in comment lines.
For example, the following two lines do not mean the same thing:
/home bob.domain.com(rw)
/home bob.domain.com (rw)
The first line allows only users from bob.domain.com read-write access to the /home directory.
The second line allows users from bob.domain.com to mount the directory read-only (the default),
but the rest of the world can mount it read-write. Be careful where space characters are used in
/etc/exports.
18.3. NFS Client Configuration Files
Any NFS share made available by a server can be mounted using various methods. Of course, the
share can be manually mounted, using themount command, to acquire the exported filesystem at a
particular mount point. However, this requires that the root user type the mount command every time
the system restarts. In addition, the root user must remember to unmount the filesystem when shutting
down the machine. Two methods of configuring NFS mounts include modifying the /etc/fstab or
utilizing the autofs service.
18.3.1. /etc/fstab
Placing a properly formatted line in the /etc/fstab file has the same effect as manually mounting
the exported filesystem. The /etc/fstab file is read by the /etc/rc.d/init.d/netfs script at
system startup. The proper filesystem mounts, including NFS, are put into place.
A sample /etc/fstab line to mount an NFS export looks like the following:
server : /path/of/dir /local/mnt/point nfs options 0 0
The server-host relates to the hostname, IP address, or fully qualified domain name of the
server exporting the filesystem. The
/path/to/shared/directory tells the server what export
to mount. The /local/mount/point specifies where on the local filesystem to mount the ex-
ported directory. This mount point must exist before /etc/fstab is read or the mount will fail. The
nfs option specifies the type of filesystem being mounted.
Vedere la pagina 242
1 2 ... 238 239 240 241 242 243 244 245 246 247 248 ... 281 282

Commenti su questo manuale

Nessun commento