source: general/sysutils/autofs.xml@ c93c620c

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since c93c620c was c93c620c, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tags

  • Property mode set to 100644
File size: 14.3 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 autofs-download-http "&kernel-dl;/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.xz">
8 <!ENTITY autofs-download-ftp " ">
9 <!ENTITY autofs-md5sum "6bd1ea8a9e5dc3a7dc95119e3bbaf52c">
10 <!ENTITY autofs-size "324 KB">
11 <!ENTITY autofs-buildsize "6.7 MB">
12 <!ENTITY autofs-time "0.1 SBU">
13]>
14
15<sect1 id="autofs" xreflabel="Autofs-&autofs-version;">
16 <?dbhtml filename="autofs.html"?>
17
18 <sect1info>
19 <date>$Date$</date>
20 </sect1info>
21
22 <title>autofs-&autofs-version;</title>
23
24 <indexterm zone="autofs">
25 <primary sortas="a-Autofs">Autofs</primary>
26 </indexterm>
27
28 <sect2 role="package">
29 <title>Introduction to Autofs</title>
30
31 <para>
32 <application>Autofs</application> controls the operation of the automount
33 daemons. The automount daemons automatically mount filesystems when they
34 are accessed and unmount them after a period of inactivity. This is done
35 based on a set of pre-configured maps.
36 </para>
37
38 &lfs110a_checked;
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>
44 Download (HTTP): <ulink url="&autofs-download-http;"/>
45 </para>
46 </listitem>
47 <listitem>
48 <para>
49 Download (FTP): <ulink url="&autofs-download-ftp;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download MD5 sum: &autofs-md5sum;
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download size: &autofs-size;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Estimated disk space required: &autofs-buildsize;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated build time: &autofs-time;
70 </para>
71 </listitem>
72 </itemizedlist>
73
74 <bridgehead renderas="sect3">Autofs Dependencies</bridgehead>
75
76 <bridgehead renderas="sect4">Required</bridgehead>
77 <para role="required">
78 <xref linkend="libtirpc"/> and
79 <xref linkend="rpcsvc-proto"/>
80 </para>
81
82 <bridgehead renderas="sect4">Optional</bridgehead>
83 <para role="optional">
84 <xref linkend="nfs-utils"/>,
85 <xref linkend="libnsl"/>,
86 <xref linkend="libxml2"/>,
87 <xref linkend="mitkrb"/>,
88 <xref linkend="openldap"/> (client only), and
89 <xref linkend="cyrus-sasl"/>
90 </para>
91
92 <para condition="html" role="usernotes">User Notes:
93 <ulink url="&blfs-wiki;/autofs"/></para>
94
95 </sect2>
96
97 <sect2 role="kernel" id="autofs-kernel">
98 <title>Kernel Configuration</title>
99
100 <indexterm zone="autofs autofs-kernel">
101 <primary sortas="d-Automounter">Automounter</primary>
102 </indexterm>
103
104 <para>
105 Verify that automounter kernel support has been enabled:
106 </para>
107
108<screen><literal>File systems ---&gt;
109 &lt;*/M&gt; Kernel automounter support (supports v3, v4, and v5) [CONFIG_AUTOFS_FS]</literal></screen>
110
111 <para>
112 Optionally, enable the following options in the kernel configuration:
113 </para>
114
115<screen><literal>File systems ---&gt;
116 [*] Network File Systems ---&gt; [CONFIG_NETWORK_FILESYSTEMS]
117 &lt;*/M&gt; NFS client support [CONFIG_NFS_FS]
118 &lt;*/M&gt; SMB3 and CIFS support (advanced network filesystem) [CONFIG_CIFS]</literal></screen>
119
120 <para>
121 Recompile and install the new kernel, if necessary.
122 </para>
123
124 </sect2>
125
126 <sect2 role="installation">
127
128 <title>Installation of Autofs</title>
129
130 <para>Some lines of code need to be removed for this package to be
131 consistent with glibc-2.34. We will remove these lines with some sed commands
132 by line numbers showing slightly different methods.</para>
133
134<screen><userinput>sed -e '87d' \
135 -e '2618,2644d' \
136 -i daemon/automount.c &amp;&amp;
137
138sed -i '1178,1180d' daemon/state.c &amp;&amp;
139sed -i '275,+2 d' lib/alarm.c</userinput></screen>
140
141
142 <para>
143 Install <application>Autofs</application> by running the following
144 commands:
145 </para>
146
147<screen revision="sysv"><userinput>./configure --prefix=/usr \
148 --with-mapdir=/etc/autofs \
149 --with-libtirpc \
150 --without-openldap \
151 --mandir=/usr/share/man &amp;&amp;
152make</userinput></screen>
153
154<screen revision="systemd"><userinput>./configure --prefix=/usr \
155 --with-mapdir=/etc/autofs \
156 --with-libtirpc \
157 --with-systemd \
158 --without-openldap \
159 --mandir=/usr/share/man &amp;&amp;
160make</userinput></screen>
161
162 <para>
163 This package does not come with a test suite.
164 </para>
165
166 <para>
167 Now, as the <systemitem class="username">root</systemitem> user:
168 </para>
169
170<screen role="root"><userinput>make install</userinput></screen>
171
172<!-- As of version 5.1.5, the configuration files are not installed anymore -->
173 <caution>
174 <para>
175 If <application>autofs</application> is already installed on your
176 system, be sure to backup your configuration files. They'll be
177 overwritten by the following command.
178 </para>
179 </caution>
180
181 <para>
182 Install the default configuration files, still as the
183 <systemitem class="username">root</systemitem> user:
184 </para>
185
186<screen role="root"><userinput>make install_samples</userinput></screen>
187
188 </sect2>
189
190 <sect2 role="commands">
191 <title>Command Explanations</title>
192
193 <para>
194 <parameter>--with-libtirpc</parameter>: This switch forces the package to
195 use libtirpc for RPC functionality instead of relying on implementation
196 from Glibc, which was removed in LFS 8.1.
197 </para>
198
199 <para revision="systemd">
200 <parameter>--with-systemd</parameter>: This switch enables installation
201 of the bundled systemd units.
202 </para>
203
204 <para>
205 <parameter>--without-openldap</parameter>: This switch disables openldap
206 if found. If openldap is desired, omit this switch. Note that openldap
207 support in autofs requires <xref linkend="mitkrb"/>.
208 </para>
209
210 </sect2>
211
212 <sect2 role="configuration">
213 <title>Configuring Autofs</title>
214
215 <sect3 id="autofs-config">
216 <title>Config Files</title>
217
218 <para>
219 <filename>/etc/sysconfig/autofs.conf</filename>,
220 <filename>/etc/autofs/auto.master</filename>,
221 <filename>/etc/autofs/auto.misc</filename>, and
222 <filename>/etc/autofs/auto.net</filename>
223 </para>
224
225 <indexterm zone="autofs autofs-config" >
226 <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
227 </indexterm>
228
229 <indexterm zone="autofs autofs-config">
230 <primary sortas="e-etc-auto.master">/etc/autofs/auto.master</primary>
231 </indexterm>
232
233 <indexterm zone="autofs autofs-config">
234 <primary sortas="e-etc-auto.misc">/etc/autofs/auto.misc</primary>
235 </indexterm>
236
237 <indexterm zone="autofs autofs-config">
238 <primary sortas="e-etc-auto.net">/etc/autofs/auto.net</primary>
239 </indexterm>
240
241 </sect3>
242
243 <sect3>
244 <title>Configuration Information</title>
245
246 <para>
247 The installation process creates <filename>auto.master</filename>,
248 <filename>auto.misc</filename>, <filename>auto.smb</filename>, and
249 <filename>auto.net</filename>. Replace the
250 <filename>auto.master</filename> file with the following commands
251 as the <systemitem class="username">root</systemitem> user:
252 </para>
253
254<screen role="root"><userinput>mv /etc/autofs/auto.master /etc/autofs/auto.master.bak &amp;&amp;
255cat &gt; /etc/autofs/auto.master &lt;&lt; "EOF"
256<literal># Begin /etc/autofs/auto.master
257
258/media/auto /etc/autofs/auto.misc --ghost
259#/home /etc/autofs/auto.home
260
261# End /etc/autofs/auto.master</literal>
262EOF</userinput></screen>
263
264 <para>
265 This file creates a new media directory,
266 <filename>/media/auto</filename> that will overlay any existing
267 directory of the same name. In this example, the file,
268 <filename>/etc/autofs/auto.misc</filename>, has a line:
269 </para>
270
271<screen>cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom</screen>
272
273 <para>
274 that will mount a cdrom as <filename>/media/auto/cd</filename> if
275 that directory is accessed. The <option>--ghost</option> option tells
276 the automounter to create <quote>ghost</quote> versions (i.e. empty
277 directories) of all the mount points listed in the configuration file
278 regardless whether any of the file systems are actually mounted or not.
279 This is very convenient and highly recommended, because it will show
280 you the available auto-mountable file systems as existing directories,
281 even when their file systems aren't currently mounted. Without the
282 <option>--ghost</option> option, you'll have to remember the names of
283 the directories. As soon as you try to access one of them, the
284 directory will be created and the file system will be mounted. When
285 the file system gets unmounted again, the directory is destroyed too,
286 unless the <option>--ghost</option> option was given.
287 </para>
288
289 <note>
290 <para>
291 An alternative method would be to specify another automount
292 location such as <filename
293 class='directory'>/var/lib/auto/cdrom</filename> and create a
294 symbolic link from <filename
295 class='directory'>/media/cdrom</filename> to the automount location.
296 </para>
297 </note>
298
299 <para>
300 The <filename>auto.misc</filename> file must be configured to your
301 working hardware. The loaded configuration file should load your cdrom
302 if <filename>/dev/cdrom</filename> is active or it can be edited to
303 match your device setup. Examples for floppies are available in the
304 file and easily activated. Documentation for this file is available
305 using the <command>man 5 autofs</command> command.
306 </para>
307
308 <para>
309 In the second line, if enabled, a user's home directory would be
310 mounted via NFS upon login. The <filename>/etc/home.auto</filename>
311 would need to exist and have an entry similar to:
312 </para>
313
314<screen>joe example.org:/export/home/joe</screen>
315
316 <para>
317 where the directory <filename>/export/home/joe</filename> is
318 exported via NFS from the system example.org. NFS shares
319 are covered on the next page.
320 </para>
321
322 <para>
323 This package could also be used to mount SMB shares, however that
324 feature is not configured in these instructions. For additional
325 configuration information, see the man pages for auto.master(5). There
326 are also web resources such as this <ulink
327 url='http://wiki.gentoo.org/wiki/AutoFS'>AUTOFS
328 HOWTO</ulink> available.
329 </para>
330
331 </sect3>
332
333 <sect3 id="autofs-init">
334 <title><phrase revision="sysv">Boot Script</phrase>
335 <phrase revision="systemd">Systemd Unit</phrase></title>
336
337 <para revision="sysv">
338 <application>autofs</application> installs its own
339 boot script, but it has no capability for logging or visual conformance
340 with other BLFS scripts. It will be replaced by an enhanced version.
341 </para>
342
343 <para revision="sysv">
344 Install the <filename>/etc/init.d/autofs</filename>
345 mount script included with the <xref linkend="bootscripts"/>
346 package.
347 </para>
348
349 <para revision="systemd">
350 To start <application>Autofs</application> at boot, enable the
351 previously installed systemd unit by running the following command as
352 the <systemitem class="username">root</systemitem> user:
353 </para>
354
355 <indexterm zone="autofs autofs-init">
356 <primary sortas="f-autofs-init">autofs</primary>
357 </indexterm>
358
359<screen role="root" revision="sysv"><userinput>make install-autofs</userinput></screen>
360
361<screen role="root" revision="systemd"><userinput>systemctl enable autofs</userinput></screen>
362
363 <para revision="sysv">
364 The time-out variable is set in
365 <filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
366 a default of 60 seconds of inactivity before unmounting the device. A
367 much shorter time may be necessary to protect buffer writing to a floppy
368 if users tend to remove the media prior to the timeout setting.
369 </para>
370
371 <note revision="systemd">
372 <para>
373 You can also specify <envar>OPTIONS</envar> variable in the
374 <filename>/etc/sysconfig/autofs</filename> file with any additional
375 parameters that you might want to pass to the automount daemon.
376 </para>
377 </note>
378
379 </sect3>
380
381 </sect2>
382
383 <sect2 role="content">
384 <title>Contents</title>
385
386 <segmentedlist>
387 <segtitle>Installed Program</segtitle>
388 <segtitle>Installed Libraries</segtitle>
389 <segtitle>Installed Directories</segtitle>
390
391 <seglistitem>
392 <seg>automount</seg>
393 <seg>
394 lookup_dir.so, lookup_file.so, lookup_files.so, lookup_hosts.so,
395 lookup_ldap.so, lookup_multi.so, lookup_nis.so, lookup_nisplus.so,
396 lookup_program.so, lookup_userhome.so, lookup_yp.so, mount_afs.so,
397 mount_autofs.so, mount_bind.so, mount_changer.so, mount_ext2.so,
398 mount_ext3.so, mount_ext4.so, mount_generic.so, mount_nfs.so,
399 mount_nfs4.so, parse_amd.so, and parse_sun.so
400 </seg>
401 <seg>/usr/lib/autofs, /etc/autofs</seg>
402 </seglistitem>
403 </segmentedlist>
404
405 <variablelist>
406 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
407 <?dbfo list-presentation="list"?>
408 <?dbhtml list-presentation="table"?>
409
410 <varlistentry id="automount">
411 <term><command>automount</command></term>
412 <listitem>
413 <para>
414 is the daemon that performs the mounting when a request is
415 made for the device
416 </para>
417 <indexterm zone="autofs automount">
418 <primary sortas="b-automount">automount</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 </variablelist>
424
425 </sect2>
426
427</sect1>
Note: See TracBrowser for help on using the repository browser.