12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Network File System 299Editing and Deleting NFS SharesTo modify an existing share, select it from the list and click the Properties button in thetoolbar. The existing settings for the share are shown and can be modified. After you clickOK, the changes take place immediately.To delete a share, select it from the list and click Delete. The shared directory is removedfrom the list. Once again, the change takes place immediately.Configuring the NFS Server on the Command LineTo configure a <strong>Red</strong> <strong>Hat</strong> <strong>Enterprise</strong> <strong>Linux</strong> system as an NFS server via the command line,make sure the nfs-utils RPM package is installed.The server configuration file, /etc/exports, uses the following format:13shared_directory allowed_hosts(options)where shared_directory is the name of the directory to be shared, allowed_hosts is theIP address range of the allowed clients, and options is a list of NFS options for theexported directory. Obviously, the exported directory must exist. Refer to the previoussection on graphical configuration for valid IP address range configuration. You must beroot to modify this file.For example, the following /etc/exports line allows all systems with 192.168.1.* IPaddresses read-write access to the /shared/ directory:/shared 192.168.1.0/255.255.255.0(sync,rw)CAUTIONNotice that allowed_hosts and (options) do not have a space between them. If aspace is included, the options are applied to any and all IP addresses, which can bequite dangerous if write permission is granted.The sync or async option must be specified as an NFS option. If sync is specified, theserver waits until the request is written to disk before responding to the client. The syncoption is recommended because it follows the NFS protocol.To grant read-write access for the exported directory, use the rw option. For additionaloptions, refer to the previous section on graphical configuration. For a full list of NFSserver options, refer to the exports man page with the command man exports. Optionsshould be separated by commas.Starting and Stopping the NFS ServerThe root user must execute the commands to start, stop, and reload the NFS server. Tostart the NFS server, execute the command service nfs start. To stop the server,execute the command service nfs stop. If the server is already started and the/etc/exports configuration file is altered, the NFS server must be informed. Use thecommand service nfs reload to force the server to reread the configuration file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!