source:
chapter07/network.xml@
a460953
Last change on this file since a460953 was 3d36131c, checked in by , 20 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ | |
3 | <!ENTITY % general-entities SYSTEM "../general.ent"> | |
4 | %general-entities; | |
5 | ]> | |
[3be4d97] | 6 | <sect1 id="ch-scripts-network"> |
[00a2bd12] | 7 | <title>Configuring the network script</title> |
[673b0d8] | 8 | <?dbhtml filename="network.html"?> |
9 | ||
[00a2bd12] | 10 | |
11 | <sect2> | |
12 | <title>Creating network interface configuration files</title> | |
13 | ||
[1d317bb] | 14 | <para>The following command creates a sample <filename>ipv4</filename> file for the |
[a088964] | 15 | <filename>eth0</filename> device:</para> |
[00a2bd12] | 16 | |
[a088964] | 17 | <screen><userinput>cd /etc/sysconfig/network-devices && |
18 | mkdir ifconfig.eth0 && | |
19 | cat > ifconfig.eth0/ipv4 << "EOF" | |
[00a2bd12] | 20 | ONBOOT=yes |
[a088964] | 21 | SERVICE=ipv4-static |
[00a2bd12] | 22 | IP=192.168.1.1 |
[ba85054d] | 23 | GATEWAY=192.168.1.2 |
[c0155c7] | 24 | PREFIX=24 |
[00a2bd12] | 25 | BROADCAST=192.168.1.255 |
[f67f5cf] | 26 | EOF</userinput></screen> |
[00a2bd12] | 27 | |
28 | </sect2> | |
29 | ||
[f67f5cf] | 30 | <sect2 id="resolv.conf"> |
[45340ae] | 31 | <title>Creating the /etc/resolv.conf file</title> |
32 | ||
[1d317bb] | 33 | <para>Create the file by running the following:</para> |
[45340ae] | 34 | |
[f67f5cf] | 35 | <screen><userinput>cat > /etc/resolv.conf << "EOF" |
[45340ae] | 36 | # Begin /etc/resolv.conf |
37 | ||
[a088964] | 38 | domain {<replaceable>[Your Domain Name]</replaceable>} |
[f67f5cf] | 39 | nameserver <replaceable>[IP address of your nameserver]</replaceable> |
[45340ae] | 40 | |
41 | # End /etc/resolv.conf | |
[f67f5cf] | 42 | EOF</userinput></screen> |
[45340ae] | 43 | |
44 | </sect2> | |
45 | ||
[00a2bd12] | 46 | </sect1> |
Note:
See TracBrowser
for help on using the repository browser.