source: networking/netprogs/nfs-utils-systemd.xml@ 61849670

7.6-blfs 7.6-systemd kde5-14269 kde5-14686 systemd-13485
Last change on this file since 61849670 was 61849670, checked in by Krejzi <krejzi@…>, 10 years ago

Remove references to libcap-pam from packages as nothing needs the pam module. libcap is in LFS.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@13896 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 18.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY nfs-utils-download-http "&sourceforge-repo;/nfs/nfs-utils-&nfs-utils-version;.tar.bz2">
8 <!ENTITY nfs-utils-download-ftp " ">
9 <!ENTITY nfs-utils-md5sum "3ac3726eda563946d1f44ac3e5b61d56">
10 <!ENTITY nfs-utils-size "763 KB">
11 <!ENTITY nfs-utils-buildsize "16 MB">
12 <!ENTITY nfs-utils-time "0.2 SBU">
13]>
14
15<sect1 id="nfs-utils" xreflabel="nfs-utils-&nfs-utils-version;">
16 <?dbhtml filename="nfs-utils.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>NFS-Utils-&nfs-utils-version;</title>
24
25 <indexterm zone="nfs-utils">
26 <primary sortas="a-Nfs-utils">NFS Utilities</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to NFS Utilities</title>
31
32 <para>The <application>NFS Utilities</application> package contains the
33 userspace server and client tools necessary to use the kernel's NFS
34 abilities. NFS is a protocol that allows sharing file systems over the
35 network.</para>
36
37 &lfs75_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing='compact'>
41 <listitem>
42 <para>Download (HTTP): <ulink url="&nfs-utils-download-http;"/></para>
43 </listitem>
44 <listitem>
45 <para>Download (FTP): <ulink url="&nfs-utils-download-ftp;"/></para>
46 </listitem>
47 <listitem>
48 <para>Download MD5 sum: &nfs-utils-md5sum;</para>
49 </listitem>
50 <listitem>
51 <para>Download size: &nfs-utils-size;</para>
52 </listitem>
53 <listitem>
54 <para>Estimated disk space required: &nfs-utils-buildsize;</para>
55 </listitem>
56 <listitem>
57 <para>Estimated build time: &nfs-utils-time;</para>
58 </listitem>
59 </itemizedlist>
60
61 <bridgehead renderas="sect3">Additional Download</bridgehead>
62 <itemizedlist spacing="compact">
63 <listitem>
64 <para>
65 Required patch:
66 <ulink url="&patch-root;/nfs-utils-&nfs-utils-version;-gcc_4_9-1.patch"/>
67 </para>
68 </listitem>
69 </itemizedlist>
70
71 <bridgehead renderas="sect3">NFS Utilities Dependencies</bridgehead>
72
73 <bridgehead renderas="sect4">Required</bridgehead>
74 <para role="required">
75 <xref linkend="libtirpc"/>
76 </para>
77
78 <bridgehead renderas="sect4">Optional</bridgehead>
79 <para role="optional">
80 <xref linkend="libevent"/>,
81 <xref linkend="sqlite"/> and
82 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">libnfsidmap</ulink> (for NFSv4 support),
83 <xref linkend="mitkrb"/> or
84 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">libgssapi</ulink>, and
85 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">librpcsecgss</ulink> (for GSS and RPC security support)
86 </para>
87
88 <bridgehead renderas="sect4">Required (runtime)</bridgehead>
89 <para role="required">
90 <xref linkend="rpcbind"/>
91 </para>
92
93 <para condition="html" role="usernotes">User Notes:
94 <ulink url="&blfs-wiki;/nfs-utils"/></para>
95
96 </sect2>
97
98 <sect2 role="kernel" id='nfs-utils-kernel'>
99 <title>Kernel Configuration</title>
100
101 <para>Enable the following options in the kernel configuration
102 and recompile the kernel if necessary:</para>
103
104<screen><literal>File systems ---&gt;
105 Network File Systems ---&gt;
106 NFS client support: Y or M
107 NFS server support: Y or M</literal></screen>
108
109 <para>Select the appropriate sub-options that appear when the above options
110 are selected.</para>
111
112 <indexterm zone="nfs-utils nfs-utils-kernel">
113 <primary sortas="d-nfs-utils">NFS Utilities</primary>
114 </indexterm>
115
116 </sect2>
117
118 <sect2 role="installation" id='nfs-utils-install'
119 xreflabel='NFS Utilities Installation'>
120 <title>Installation of NFS Utilities</title>
121
122 <para>Before you compile the program, ensure that the
123 <systemitem class="username">nobody</systemitem> user and
124 <systemitem class="groupname">nogroup</systemitem> group have been
125 created. You can add them by running the following commands as the
126 <systemitem class="username">root</systemitem> user:</para>
127
128<screen role="root"><userinput>groupadd -g 99 nogroup &amp;&amp;
129useradd -c "Unprivileged Nobody" -d /dev/null -g nogroup \
130 -s /bin/false -u 99 nobody</userinput></screen>
131
132 <note>
133 <para>The classic uid and gid values are 65534 which is also -2 when
134 interpreted as a signed 16-bit number. These values impact other files
135 on some filesystems that do not have support for sparse files. The
136 <systemitem class="username">nobody</systemitem> and <systemitem
137 class="groupname">nogroup</systemitem> values are relatively arbitrary.
138 The impact on a server is nil if the <filename>exports</filename> file
139 is configured correctly. If it is misconfigured, an
140 <command>ls -l</command> or <command>ps</command> listing will show a
141 uid or gid number of 65534 instead of a name. The client uses <systemitem
142 class="username">nobody</systemitem> only as the user running
143 <command>rpc.statd</command>.</para>
144 </note>
145
146 <para>Install <application>NFS Utilities</application> by running
147 the following commands:</para>
148
149<screen><userinput>patch -Np1 -i ../nfs-utils-&nfs-utils-version;-gcc_4_9-1.patch &amp;&amp;
150./configure --prefix=/usr \
151 --sysconfdir=/etc \
152 --without-tcp-wrappers \
153 --disable-nfsv4 \
154 --disable-gss &amp;&amp;
155make</userinput></screen>
156
157 <para>If your <filename class="directory">/usr</filename> directory
158 is NFS mounted, you should install the executables in
159 <filename class="directory">/sbin</filename> by passing
160 an additional parameter <option>--sbindir=/sbin</option> to the
161 above <command>./configure</command> command.</para>
162
163 <para>To test the results, issue: <command>make check</command>.</para>
164
165 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
166
167<!-- dev note: make statduser=$(whoami) DESTDIR=<DESTDIR> install -->
168
169<screen role='root'><userinput>make install</userinput></screen>
170
171 </sect2>
172
173 <sect2 role="commands">
174 <title>Command Explanations</title>
175
176 <para><parameter>--without-tcp-wrappers</parameter>: This option is
177 needed because TCP Wrappers is not in BLFS.</para>
178
179 <para><parameter>--disable-nfsv4</parameter>: Disables support
180 for NFS version 4.</para>
181
182 <para><parameter>--disable-gss</parameter>: Disables support for
183 RPCSEC GSS (RPC Security).</para>
184
185 </sect2>
186
187 <sect2 role="configuration">
188 <title>Configuring NFS Utilities</title>
189
190 <sect3 id='nfs-utils-server-config'>
191 <title>Server Configuration</title>
192
193 <para><filename>/etc/exports</filename> contains the exported directories
194 on NFS servers. Refer to the <filename>exports.5</filename> manual page
195 for the syntax of this file. Also refer to the "NFS HowTo" available at
196 <ulink url="http://nfs.sourceforge.net/nfs-howto/"/> for information on
197 how to configure the servers and clients in a secure manner. For example,
198 for sharing the <filename class="directory">/home</filename> directory
199 over the local network, the following line may be added:</para>
200
201<screen role="root"><userinput>/home <replaceable>&lt;192.168.0.0/24&gt;</replaceable>(rw,subtree_check,anonuid=99,anongid=99)</userinput></screen>
202
203 <indexterm zone="nfs-utils nfs-utils-server-config">
204 <primary sortas="e-etc-exportfs">/etc/exportfs</primary>
205 </indexterm>
206
207 <sect4 id="nfs-utils-server-init">
208 <title>Systemd Units</title>
209
210 <para>
211 To start the NFS server daemons at boot,
212 install the systemd units from the <xref linkend="bootscripts"/>
213 package by running the following command as the
214 <systemitem class="username">root</systemitem> user:
215 </para>
216
217<screen role="root"><userinput>make install-nfs-server</userinput></screen>
218
219 <indexterm zone="nfs-utils nfs-utils-server-init">
220 <primary sortas="f-nfs-server">nfs-server</primary>
221 </indexterm>
222
223 <para>You can edit the <filename>/etc/default/nfs-utils</filename>
224 file to change the startup options for NFS daemons. Defaults should
225 be fine for most use cases.</para>
226
227 <indexterm zone="nfs-utils nfs-utils-server-init">
228 <primary sortas="e-etc-default-nfs-utils">/etc/default/nfs-utils</primary>
229 </indexterm>
230
231 </sect4>
232
233 </sect3>
234
235 <sect3 id='nfs-utils-client-config'>
236 <title>Client Configuration</title>
237
238 <para><filename>/etc/fstab</filename> contains the directories that
239 are to be mounted on the client. Alternately the partitions can be
240 mounted by using the <command>mount</command> command with the proper
241 options. To mount the <filename class="directory">/home</filename>
242 and <filename class="directory">/usr</filename> partitions, add the
243 following to the <filename>/etc/fstab</filename>:</para>
244
245<screen role="root"><userinput><replaceable>&lt;server-name&gt;</replaceable>:/home /home nfs rw,_netdev 0 0
246<replaceable>&lt;server-name&gt;</replaceable>:/usr /usr nfs ro,_netdev 0 0</userinput></screen>
247
248 <para>The options which can be used are specified in <command>man 5 nfs</command>.
249 If both the client and server are running recent versions of linux, most of the
250 options will be negotiated. You can specify either <literal>rw</literal> or
251 <literal>ro</literal>, <literal>_netdev</literal> if the filesystem is to be
252 automatically mounted at boot, or <literal>noauto</literal> (and perhaps
253 <literal>user</literal>) for other filesystems.</para>
254
255 <para>If the fileserver is not running a recent version of linux, you may need to
256 specifiy other options.</para>
257
258 <para>If you are using systemd, you may need to enable autofs v4 in your kernel,
259 and add the option <literal>comment=systemd.automount</literal>. Some machines
260 need this, because systemd tries to mount the external fs&apos;s before the network
261 is up, others do not need it. An alternative is for <systemitem
262 class="username">root</systemitem> to run <command>mount -a</command>.</para>
263
264 <indexterm zone="nfs-utils nfs-utils-client-config">
265 <primary sortas="e-etc-fstab">/etc/fstab</primary>
266 </indexterm>
267
268<!-- /etc/netconfig is installed by libtirpc
269 <para>In some circumstances an <filename>/etc/netconfig</filename> file
270 is required by an nfs client. It does no harm to create one even if it
271 is not in fact needed. As the <systemitem class="username">root</systemitem>
272 user:</para>
273
274<screen role="root"><userinput>cat &gt; /etc/netconfig &lt;&lt; "EOF"
275udp6 tpi_clts v inet6 udp - -
276tcp6 tpi_cots_ord v inet6 tcp - -
277udp tpi_clts v inet udp - -
278tcp tpi_cots_ord v inet tcp - -
279rawip tpi_raw - inet - - -
280local tpi_cots_ord - loopback - - -
281EOF</userinput></screen>
282
283 <indexterm zone="nfs-utils nfs-utils-client-config">
284 <primary sortas="e-etc-netconfig">/etc/netconfig</primary>
285 </indexterm>
286-->
287
288 <sect4 id="nfs-utils-client-init">
289 <title>Systemd Units</title>
290
291 <note><para>The following systemd unis are not required if the
292 nfs-server units were previously installed.</para></note>
293
294 <para>
295 To start the NFS client services at boot,
296 install the systemd units from the <xref linkend="bootscripts"/>
297 package by running the following command as the
298 <systemitem class="username">root</systemitem> user:
299 </para>
300
301<screen role="root"><userinput>make install-nfs-client</userinput></screen>
302
303 <indexterm zone="nfs-utils nfs-utils-client-config">
304 <primary sortas="f-nfs-client">nfs-client</primary>
305 </indexterm>
306
307 </sect4>
308
309 </sect3>
310
311 </sect2>
312
313 <sect2 role="content">
314 <title>Contents</title>
315 <segmentedlist>
316 <segtitle>Installed Programs</segtitle>
317 <segtitle>Installed Libraries</segtitle>
318 <segtitle>Installed Directories</segtitle>
319
320 <seglistitem>
321 <seg>exportfs, mountstats, mount.nfs, mount.nfs4 (link to mount.nfs),
322 nfsiostat, nfsstat, osd_login, rpc.mountd, rpc.nfsd, rpc.statd, rpcdebug,
323 showmount, sm-notify, start-statd, umount.nfs (link to mount.nfs),
324 and umount.nfs4 (link to mount.nfs)</seg>
325 <seg>None</seg>
326 <seg>/var/lib/nfs</seg>
327 </seglistitem>
328 </segmentedlist>
329
330 <variablelist>
331 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
332 <?dbfo list-presentation="list"?>
333 <?dbhtml list-presentation="table"?>
334
335 <varlistentry id="exportfs">
336 <term><command>exportfs</command></term>
337 <listitem>
338 <para>maintains a list of NFS exported file systems.</para>
339 <indexterm zone="nfs-utils exportfs">
340 <primary sortas="b-exportfs">exportfs</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344
345 <varlistentry id="mountstats">
346 <term><command>mountstats</command></term>
347 <listitem>
348 <para>displays NFS client per-mount statistics.</para>
349 <indexterm zone="nfs-utils mountstats">
350 <primary sortas="b-mountstats">mountstats</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="mountnfs">
356 <term><command>mount.nfs</command></term>
357 <listitem>
358 <para>Used to mount a network share using NFS</para>
359 <indexterm zone="nfs-utils mountnfs">
360 <primary sortas="b-mountnfs">mount.nfs</primary>
361 </indexterm>
362 </listitem>
363 </varlistentry>
364
365 <varlistentry id="mountnfs4">
366 <term><command>mount.nfs4</command></term>
367 <listitem>
368 <para>Used to mount a network share using NFSv4</para>
369 <indexterm zone="nfs-utils mountnfs4">
370 <primary sortas="b-mountnfs4">mount.nfs4</primary>
371 </indexterm>
372 </listitem>
373 </varlistentry>
374
375 <varlistentry id="nfsiostat-nfs-utils">
376 <term><command>nfsiostat</command></term>
377 <listitem>
378 <para>Report input/output statistics for network filesystems.</para>
379 <indexterm zone="nfs-utils nfsiostat-nfs-utils">
380 <primary sortas="b-nfsiostat-nfs-utils">nfsiostat</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
385 <varlistentry id="nfsstat">
386 <term><command>nfsstat</command></term>
387 <listitem>
388 <para>displays statistics kept about NFS client and server activity.</para>
389 <indexterm zone="nfs-utils nfsstat">
390 <primary sortas="b-nfsstat">nfsstat</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 <varlistentry id="rpcmountd">
396 <term><command>rpc.mountd</command></term>
397 <listitem>
398 <para>implements the NFS mount protocol on an NFS server.</para>
399 <indexterm zone="nfs-utils rpcmountd">
400 <primary sortas="b-rpcmountd">rpc.mountd</primary>
401 </indexterm>
402 </listitem>
403 </varlistentry>
404
405 <varlistentry id="rpcnfsd">
406 <term><command>rpc.nfsd</command></term>
407 <listitem>
408 <para>implements the user level part of the NFS
409 service on the server.</para>
410 <indexterm zone="nfs-utils rpcnfsd">
411 <primary sortas="b-rpcnfsd">rpc.nfsd</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416 <varlistentry id="rpcstatd">
417 <term><command>rpc.statd</command></term>
418 <listitem>
419 <para>is used by the NFS file locking service. Run on both sides,
420 client as well as server, when you want file locking enabled.</para>
421 <indexterm zone="nfs-utils rpcstatd">
422 <primary sortas="b-rpcstatd">rpc.statd</primary>
423 </indexterm>
424 </listitem>
425 </varlistentry>
426
427 <varlistentry id="rpcdebug">
428 <term><command>rpcdebug</command></term>
429 <listitem>
430 <para>sets or clears the kernel's NFS client and server debug
431 flags.</para>
432 <indexterm zone="nfs-utils rpcdebug">
433 <primary sortas="b-rpcdebug">rpcdebug</primary>
434 </indexterm>
435 </listitem>
436 </varlistentry>
437
438 <varlistentry id="showmount">
439 <term><command>showmount</command></term>
440 <listitem>
441 <para>displays mount information for an NFS server.</para>
442 <indexterm zone="nfs-utils showmount">
443 <primary sortas="b-showmount">showmount</primary>
444 </indexterm>
445 </listitem>
446 </varlistentry>
447
448 <varlistentry id="sm-notify">
449 <term><command>sm-notify</command></term>
450 <listitem>
451 <para>is used to send Network Status Monitor reboot messages.</para>
452 <indexterm zone="nfs-utils sm-notify">
453 <primary sortas="b-sm-notify">sm-notify</primary>
454 </indexterm>
455 </listitem>
456 </varlistentry>
457
458 <varlistentry id="start-statd">
459 <term><command>start-statd</command></term>
460 <listitem>
461 <para>is a script called by nfsmount when mounting a filesystem with
462 locking enabled, if statd does not appear to be running. It can be
463 customised with whatever flags are appropriate for the site.</para>
464 <indexterm zone="nfs-utils start-statd">
465 <primary sortas="b-start-statd">start-statd</primary>
466 </indexterm>
467 </listitem>
468 </varlistentry>
469
470 <varlistentry id="umountnfs">
471 <term><command>umount.nfs</command></term>
472 <listitem>
473 <para>Used to unmount a network share using NFS</para>
474 <indexterm zone="nfs-utils umountnfs">
475 <primary sortas="b-umountnfs">umount.nfs</primary>
476 </indexterm>
477 </listitem>
478 </varlistentry>
479
480 <varlistentry id="umountnfs4">
481 <term><command>umount.nfs4</command></term>
482 <listitem>
483 <para>Used to unmount a network share using NFSv4</para>
484 <indexterm zone="nfs-utils umountnfs4">
485 <primary sortas="b-umountnfs4">umount.nfs4</primary>
486 </indexterm>
487 </listitem>
488 </varlistentry>
489
490 </variablelist>
491
492 </sect2>
493
494</sect1>
Note: See TracBrowser for help on using the repository browser.