source: general/sysutils/autofs-systemd.xml@ 94b4def9

systemd-13485
Last change on this file since 94b4def9 was ac38e9dc, checked in by Douglas R. Reno <renodr@…>, 9 years ago

Import back into SVN from Github

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

  • Property mode set to 100644
File size: 11.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 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 "889c9d2f0e76f08ae0ff0d206f119098">
10 <!ENTITY autofs-size "284 KB">
11 <!ENTITY autofs-buildsize "11 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 &lfs77_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 ---&gt;
92 &lt;*/M&gt; 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 ---&gt;
99 [*] Network File Systems ---&gt; [CONFIG_NETWORK_FILESYSTEMS]
100 &lt;*/M&gt; NFS client support [CONFIG_NFS_FS]
101 &lt;*/M&gt; 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><userinput>./configure --prefix=/ \
115 --with-systemd \
116 --without-openldap \
117 --mandir=/usr/share/man &amp;&amp;
118make</userinput></screen>
119
120 <para>This package does not come with a test suite.</para>
121
122 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
123
124<screen role="root"><userinput>make install</userinput></screen>
125
126 </sect2>
127
128 <sect2 role="commands">
129 <title>Command Explanations</title>
130
131 <para>
132 <parameter>--with-systemd</parameter>: This switch enables installation of
133 the bundled systemd units.
134 </para>
135
136 <para>
137 <parameter>--without-openldap</parameter>: This switch disables openldap if
138 found. If openldap is desired, omit this switch. Note that openldap
139 support in autofs requires <xref linkend="mitkrb"/>.
140 </para>
141
142 <para>
143 <option>--with-libtirpc</option>: This switch enables libtirpc support if
144 available.
145 </para>
146
147 </sect2>
148
149 <sect2 role="configuration">
150 <title>Configuring Autofs</title>
151
152 <sect3 id="autofs-config">
153 <title>Config Files</title>
154
155 <para><filename>/etc/sysconfig/autofs.conf</filename>,
156 <filename>/etc/auto.master</filename>,
157 <filename>/etc/auto.misc</filename>, and
158 <filename>/etc/auto.net</filename></para>
159
160 <indexterm zone="autofs autofs-config" >
161 <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
162 </indexterm>
163
164 <indexterm zone="autofs autofs-config">
165 <primary sortas="e-etc-auto.master">/etc/auto.master</primary>
166 </indexterm>
167
168 <indexterm zone="autofs autofs-config">
169 <primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
170 </indexterm>
171
172 <indexterm zone="autofs autofs-config">
173 <primary sortas="e-etc-auto.net">/etc/auto.net</primary>
174 </indexterm>
175
176 </sect3>
177
178 <sect3>
179 <title>Configuration Information</title>
180
181 <para>The installation process creates <filename>auto.master</filename>,
182 <filename>auto.misc</filename>, <filename>auto.smb</filename>, and
183 <filename>auto.net</filename>. Replace the
184 <filename>auto.master</filename> file with the following commands
185 as the <systemitem class="username">root</systemitem> user:</para>
186
187<screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &amp;&amp;
188cat &gt; /etc/auto.master &lt;&lt; "EOF"
189<literal># Begin /etc/auto.master
190
191/media/auto /etc/auto.misc --ghost
192#/home /etc/auto.home
193
194# End /etc/auto.master</literal>
195EOF</userinput></screen>
196
197 <para>This file creates a new media directory, <filename>/media/auto</filename>
198 that will overlay any existing directory of the same name. In this example,
199 the file, <filename>/etc/auto.misc</filename>, has a line:</para>
200
201<screen>cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom</screen>
202
203 <para>that will mount a cdrom as <filename>/media/auto/cd</filename> if
204 that directory is accessed. The <option>--ghost</option> option tells
205 the automounter to create <quote>ghost</quote> versions (i.e. empty
206 directories) of all the mount points listed in the configuration file
207 regardless whether any of the file systems are actually mounted or not.
208 This is very convenient and highly recommended, because it will show you
209 the available auto-mountable file systems as existing directories, even
210 when their file systems aren't currently mounted. Without the
211 <option>--ghost</option> option, you'll have to remember the names of the
212 directories. As soon as you try to access one of them, the directory will
213 be created and the file system will be mounted. When the file system gets
214 unmounted again, the directory is destroyed too, unless the
215 <option>--ghost</option> option was given.</para>
216
217 <note>
218 <para>An alternative method would be to specify another automount
219 location such as <filename
220 class="directory">/var/lib/auto/cdrom</filename> and create a
221 symbolic link from <filename class="directory">/media/cdrom</filename>
222 to the automount location.</para>
223 </note>
224
225 <para>The <filename>auto.misc</filename> file must be configured to your
226 working hardware. The loaded configuration file should load your cdrom
227 if <filename>/dev/cdrom</filename> is active or it can be edited to
228 match your device setup. Examples for floppies are available in the file
229 and easily activated. Documentation for this file is available using the
230 <command>man 5 autofs</command> command.</para>
231
232 <para>In the second line, if enabled, a user's home directory would be
233 mounted via NFS upon login. The <filename>/etc/home.auto</filename>
234 would need to exist and have an entry similar to:</para>
235
236<screen>joe example.org:/export/home/joe</screen>
237
238 <para>where the directory <filename>/export/home/joe</filename> is
239 exported via NFS from the system example.org. NFS shares
240 are covered on the next page.</para>
241
242 <para>This package could also be used to mount SMB shares, however that
243 feature is not configured in these instructions. For additional
244 configuration information, see the man pages for auto.master(5). There
245 are also web resources such as this <ulink
246 url='http://wiki.gentoo.org/wiki/Autofs'>AUTOFS
247 HOWTO</ulink> available.</para>
248
249 </sect3>
250
251 <sect3 id="autofs-init">
252 <title>Systemd Units</title>
253
254 <para>
255 To start the <application>Autofs</application> at boot,
256 enable the previously installed systemd unit by
257 running the following command as the
258 <systemitem class="username">root</systemitem> user:
259 </para>
260
261 <indexterm zone="autofs autofs-init">
262 <primary sortas="f-autofs-init">autofs</primary>
263 </indexterm>
264
265<screen role="root"><userinput>systemctl enable autofs</userinput></screen>
266
267 <note>
268 <para>
269 You can also specify <envar>OPTIONS</envar> variable in the
270 <filename>/etc/sysconfig/autofs</filename> file with any additional
271 parameters that you might want to pass to the automount daemon.
272 </para>
273 </note>
274
275 </sect3>
276
277 </sect2>
278
279 <sect2 role="content">
280 <title>Contents</title>
281
282 <segmentedlist>
283 <segtitle>Installed Program</segtitle>
284 <segtitle>Installed Libraries</segtitle>
285 <segtitle>Installed Directories</segtitle>
286
287 <seglistitem>
288 <seg>automount</seg>
289 <seg>
290 lookup_dir.so, lookup_file.so, lookup_files.so, lookup_hosts.so,
291 lookup_ldap.so, lookup_multi.so, lookup_nis.so, lookup_nisplus.so,
292 lookup_program.so, lookup_userhome.so, lookup_yp.so, mount_afs.so,
293 mount_autofs.so, mount_bind.so, mount_changer.so, mount_ext2.so,
294 mount_ext3.so, mount_ext4.so, mount_generic.so, mount_nfs.so,
295 mount_nfs4.so, parse_amd.so, and parse_sun.so
296 </seg>
297 <seg>/lib/autofs</seg>
298 </seglistitem>
299 </segmentedlist>
300
301 <variablelist>
302 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
303 <?dbfo list-presentation="list"?>
304 <?dbhtml list-presentation="table"?>
305
306 <varlistentry id="automount">
307 <term><command>automount</command></term>
308 <listitem>
309 <para>is the daemon that performs the mounting when a request is
310 made for the device.</para>
311 <indexterm zone="autofs automount">
312 <primary sortas="b-automount">automount</primary>
313 </indexterm>
314 </listitem>
315 </varlistentry>
316
317 </variablelist>
318
319 </sect2>
320
321</sect1>
Note: See TracBrowser for help on using the repository browser.