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