source: connect/dhcp/dhcpcd.xml@ 9a6caf3c

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 9a6caf3c was 9a6caf3c, checked in by Randy McMurchy <randy@…>, 20 years ago

Added a note to the dhcpcd instructions that configuration files in /etc will be overwritten

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2450 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 6.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY dhcpcd-download-http "http://www.phystech.com/ftp/dhcpcd-&dhcpcd-version;.tar.gz">
8 <!ENTITY dhcpcd-download-ftp "ftp://ftp.phystech.com/pub/dhcpcd-&dhcpcd-version;.tar.gz">
9 <!ENTITY dhcpcd-size "145 KB">
10 <!ENTITY dhcpcd-buildsize "868 KB">
11 <!ENTITY dhcpcd-time "0.04 SBU">
12]>
13
14<sect1 id="dhcpcd" xreflabel="dhcpcd-&dhcpcd-version;">
15<?dbhtml filename="dhcpcd.html"?>
16<title>dhcpcd-&dhcpcd-version;</title>
17
18<sect2>
19<title>Introduction to <application>dhcpcd</application></title>
20
21<para>The <application>dhcpcd</application> package contains the
22<command>dhcpcd</command> client. This is useful for connecting your computer
23to a network which uses <acronym>DHCP</acronym> to assign network addresses.
24</para>
25
26<sect3><title>Package information</title>
27<itemizedlist spacing='compact'>
28<listitem><para>Download (HTTP): <ulink
29url="&dhcpcd-download-http;"/></para></listitem>
30<listitem><para>Download (FTP): <ulink
31url="&dhcpcd-download-ftp;"/></para></listitem>
32<listitem><para>Download size: &dhcpcd-size;</para></listitem>
33<listitem><para>Estimated Disk space required:
34&dhcpcd-buildsize;</para></listitem>
35<listitem><para>Estimated build time:
36&dhcpcd-time;</para></listitem></itemizedlist>
37</sect3>
38
39<sect3><title>Additional downloads</title>
40<itemizedlist spacing='compact'>
41<listitem><para>Required Patch:
42<ulink url="&patch-root;/dhcpcd-&dhcpcd-version;-fhs-1.patch"/></para></listitem>
43</itemizedlist>
44</sect3>
45
46</sect2>
47
48<sect2>
49<title>Installation of <application>dhcpcd</application></title>
50
51<para>Install <application>dhcpcd</application> by running the following
52commands:</para>
53
54<screen><userinput><command>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch &amp;&amp;
55./configure --prefix="" --sysconfdir=/var/lib \
56--mandir=/usr/share/man &amp;&amp;
57make &amp;&amp;
58make install</command></userinput></screen>
59
60</sect2>
61
62<sect2>
63<title>Command explanations</title>
64
65<para><command>patch -Np1 -i ../dhcpcd-&dhcpcd-version;-fhs-1.patch
66</command>: <application>Dhcpcd</application> unpatched puts all configuration
67and temporary files in <filename>/etc/dhcpc</filename>. This becomes very
68annoying when <application>dhcpcd</application> tells you it's running and it's
69not. You look in <filename class="directory">/var/run</filename> for
70the <filename>PID</filename> file, but it's not
71there, the <filename>PID</filename> file that needs deleting is in
72<filename class="directory">/etc/dhcpc</filename>.
73This patch brings this program into <acronym>FHS</acronym> compliance, but more
74importantly, puts files where you expect them to be.</para>
75
76<para><parameter>--prefix=""</parameter>: There may be a good reason for
77abandoning the normal <acronym>BLFS</acronym> convention of using
78<parameter>--prefix=/usr</parameter> here. If you are installing
79<acronym>DHCP</acronym>, it is likely that it is
80required during the boot process and
81<filename class="directory">/usr</filename> may be network
82mounted, in which case <command>dhcpcd</command> wouldn't be available due to
83being on the network! Therefore, depending on your situation, you may want it
84to be installed in <filename class="directory">/sbin</filename> or
85<filename class="directory">/usr/sbin</filename>. This command installs to
86<filename class="directory">/sbin</filename>.</para>
87
88<para><parameter>--sysconfdir=/var/lib</parameter>: This command installs
89configuration files in the <filename class="directory">/var/lib</filename>
90directory.</para>
91
92<para><parameter>--mandir=/usr/share/man</parameter>: This command installs
93the man pages to the <filename class="directory">/usr/share/man</filename>
94directory.</para>
95
96</sect2>
97
98<sect2>
99<title>Configuring <application>dhcpcd</application></title>
100
101<sect3><title>Config files</title>
102<para><filename>/var/lib/dhcpc/*</filename></para></sect3>
103
104<sect3><title>Configuration Information</title>
105
106<para>To configure <command>dhcpcd</command>, you need to first install
107the network service script,
108<filename>/etc/sysconfig/network-devices/services/dhcpcd</filename>
109included in the <xref linkend="intro-important-bootscripts"/> package.</para>
110
111<screen><userinput><command>make install-service-dhcpcd</command></userinput></screen>
112
113<note><para>The default behavior of <command>dhcpcd</command> is to overwrite
114(after making backup copies) <filename>/etc/resolv.conf</filename>,
115<filename>/etc/yp.conf</filename> and <filename>/etc/ntp.conf</filename> with
116new files containing information from the <acronym>DHCP</acronym> server. If
117this is undesirable, review the <command>dhcpcd</command> man page for
118switches to add to the <command>dhcpcd</command> command in the network
119service script.</para></note>
120
121<para>Now create the <filename>ifconfig.eth0</filename> configuration
122file using the following commands. Adjust appropriately for additional
123interfaces.</para>
124
125<para><emphasis>Note:</emphasis> This will overwrite any existing file.</para>
126
127<screen><userinput><command>cat &gt; /etc/sysconfig/network-devices/ifconfig.eth0 &lt;&lt; "EOF"</command>
128ONBOOT=yes
129DHCP_START="<replaceable>[insert appropriate start options here]</replaceable>"
130DHCP_STOP="-k <replaceable>[insert other stop options here]</replaceable>"
131SERVICE=dhcpcd
132<command>EOF</command></userinput></screen>
133
134<para>For more information on the appropriate
135<envar>DHCP_START</envar> and <envar>DHCP_STOP</envar>
136values, examine the man page for <command>dhcpcd</command>.</para>
137
138<para>Finally, if the <acronym>DHCP</acronym> configured interface is
139used as your default gateway, you should remove the GATEWAY and GATEWAY_IF
140variables from <filename>/etc/sysconfig/network</filename>: </para>
141
142<screen><userinput><command>sed -i "s/GATEWAY/#&amp;/" /etc/sysconfig/network</command></userinput></screen>
143
144</sect3>
145
146</sect2>
147
148<sect2>
149<title>Contents</title>
150
151<para>The <application>dhcpcd</application> package contains
152<command>dhcpcd</command>.</para>
153
154</sect2>
155
156<sect2><title>Description</title>
157
158<sect3><title>dhcpcd</title>
159<para><command>dhcpcd</command> is an implementation of the
160<acronym>DHCP</acronym> client specified in <acronym>RFC</acronym>2131 and
161<acronym>RFC</acronym>1541 (depending on which options are specified).</para>
162</sect3>
163
164</sect2>
165
166</sect1>
167
Note: See TracBrowser for help on using the repository browser.