![]() |
| ◆ | DHCPサーバーのインストール |
|
Fedora 8 のインストール時 “DHCPサーバ” を選択していれば dhcp はインストールされています。 もし、Fedora 8 のインストール時 “DHCPサーバ” を選択していない場合は下記要領でインストールして下さい。 下記のように入力します。青文字が入力文字です。 |
|
|
[root@linux]# yum install dhcp ← 入力 fedora 100% |=========================| 2.1 kB 00:00 updates 100% |=========================| 2.3 kB 00:00 Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package dhcp.i386 12:3.0.6-12.fc8 set to be updated --> Processing Dependency: openldap-servers for package: dhcp --> Running transaction check ---> Package openldap-servers.i386 0:2.3.39-3.fc8 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: dhcp i386 12:3.0.6-12.fc8 updates 866 k Installing for dependencies: openldap-servers i386 2.3.39-3.fc8 updates 1.9 M Transaction Summary ============================================================================= Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 2.8 M Is this ok [y/N]: y ← y を入力 Downloading Packages: (1/2): openldap-servers-2 100% |=========================| 1.9 MB 00:01 (2/2): dhcp-3.0.6-12.fc8. 100% |=========================| 866 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing: openldap-servers ######################### [1/2] Installing: dhcp ######################### [2/2] Installed: dhcp.i386 12:3.0.6-12.fc8 Dependency Installed: openldap-servers.i386 0:2.3.39-3.fc8 Complete! ← Complete! と表示されれば完了 |
|
| ◆ | DHCPサーバーの設定 |
| 下記のように入力します。青文字が入力文字です。 | |
|
[root@linux]# vi /etc/dhcpd.conf ← 入力 |
|
| 上記のように入力すると下記のようなファイルが表示されます。 | |
|
# # DHCP Server Configuration file. # see /usr/share/doc/dhcp*/dhcpd.conf.sample # |
|
|
どういう訳だかわかりませんが解りませんが設定ファイルには設定記述がなく実際に設定記述のあるファイルの場所が記述されています。上記の場合では
/usr/share/doc/dhcp*/dhcpd.conf.sample
にあると言うことなのでこのファイルをコピーして使うことにします。 下記のように入力します。青文字が入力文字です。 |
|
|
[root@linux]# cp /usr/share/doc/dhcp*/dhcpd.conf.sample /etc/dhcpd.conf ← 入力 cp: `/etc/dhcpd.conf' を上書きしてもよろしいですか(yes/no)? yes ← 入力 |
|
|
これで設定ファイルが出来上がりましたので再度設定ファイルを開いて設定します。 下記のように緑色の部分を黄色に変更(書き換え・削除)して下さい。赤文字は説明です。青文字が入力文字です。 |
|
|
[root@linux]# vi /etc/dhcpd.conf ← vi /etc/dhcpd.conf を入力 ddns-update-style interim; ignore client-updates; subnet 192.168.0.0 netmask 255.255.255.0 { ↓ subnet 192.168.0.0 netmask 255.255.255.0 { ← 自分の環境に合わせる # --- default gateway option routers 192.168.0.1; ↓ option routers 192.168.1.200; ← ルーターのアドレス option subnet-mask 255.255.255.0; option nis-domain "domain.org"; ↓ #option nis-domain "domain.org"; ← コメント化 option domain-name "domain.org"; ↓ #option domain-name "domain.org"; ← コメント化 option domain-name-servers 192.168.1.1; ↓ option domain-name-servers 192.168.1.200; ← ルーターのアドレス option time-offset -18000; # Eastern Standard Time # option ntp-servers 192.168.1.1; # option netbios-name-servers 192.168.1.1; # --- Selects point-to-point node (default is hybrid). Don't change this unless # -- you understand Netbios very well # option netbios-node-type 2; range dynamic-bootp 192.168.0.128 192.168.0.254; ↓ range dynamic-bootp 192.168.1.11 192.168.1.99; ← 割り当てるアドレスの範囲 default-lease-time 21600; max-lease-time 43200; # we want the nameserver to appear at a fixed address host ns { ↓ #host ns { ← コメント化 next-server marvin.redhat.com; ↓ #next-server marvin.redhat.com; ← コメント化 hardware ethernet 12:34:56:78:AB:CD; ↓ #hardware ethernet 12:34:56:78:AB:CD; ← コメント化 fixed-address 207.175.42.254; ↓ #fixed-address 207.175.42.254; ← コメント化 } ↓ #} ← コメント化 ※特定のホスト(******)に決まったアドレス(192.168.1.zz)を割り当てる場合は下記を追記 host ****** { hardware ethernet xx:xx:xx:xx:xx:xx; ← xx:xx:xx:xx:xx:xx: はMACアドレス fixed-address 192.168.1.zz; } } |
|
| ◆ | dhcp の起動 |
| 下記のように入力します。青文字が入力文字です。 | |
|
[root@linux]# /etc/rc.d/init.d/dhcpd start ← /etc/rc.d/init.d/dhcpd start を入力(samba の起動) dhcpd を起動中: [ OK ] |
|
| 続いてPCの再起動に vsftpd を自動的に起動するようにします。下記のように入力します。青文字が入力文字です。 | |
|
[root@linux]# chkconfig dhcpd on ← chkconfig dhcpd on を入力(dhcp の自動起動) |
|
| 自動起動設定の確認。下記のように入力し 、下記のように表示されればOKです。青文字が入力文字です。 | |
|
[root@linux]# chkconfig --list dhcpd ← chkconfig --list dhcpd を入力(dhcp の自動起動確認) httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
|
| 再起動は下記のように入力します。青文字が入力文字です。 | |
|
[root@linux]# /etc/rc.d/init.d/dhcpd restart |
|
| ◆ | クライアント側の設定 |
| デスクトップの『マイ
ネットワーク』を右クリック後『プロパティ』をクリック、『ネットワーク接続』が開きますので『ローカル
エリア接続』を右クリック後『プロパティ』をクリック、『ローカルエリア接続のプロパティ』が開きますので『インターネットプロトコル(TCP/IP)』を選択して『プロパティ』をクロックします。下図のような『インターネットプロトコル(TCP/IP)のプロパティ』が表示されますので『IPアドレスを自動的に取得する』・『DNSサーバーのアドレスを自動的に取得する』にチェックを入れ『OK』をクリックします。
|
|