DHCP安裝1
1:首先安裝dhcp-3.0.5-18.el5包
2:安裝過後然後通過rpm -qc dhcp 查看他可以配置的文檔
3:找到/etc/dhcpd.conf這個文檔並且編輯
4:用vim編輯器編輯 vim /etc/dhcpd.conf
進去之後看到此文本是空的,不過可以看到注釋的一句話 (# see /usr/share/doc/dhcp*/dhcpd.conf.sample )大概意思是:參考/usr/share/doc/dhcp*/dhcpd.conf.sample
5:參考上步的/usr/share/doc/dhcp*/dhcpd.conf.sample文檔,在vim etc/dhcpd.conf中執行:r /usr/share/doc/dhcp*/dhcpd.conf.sample 讀取這個文檔中的內容
6:修改現在的/etc/dhcpd.conf文檔
1 #
2 # DHCP Server Configuration file.
3 # see /usr/share/doc/dhcp*/dhcpd.conf.sample
4 #
5 ddns-update-style interim;
6 ignore client-updates;
7 option domain-name-servers 222.88.88.88,222.85.85.85; (超級作用域的DNS服務器)
8 subnet 192.168.60.0 netmask 255.255.255.0 { (一個普通作用域的網段,子網掩碼)
9
10 # --- default gateway
11 option routers 192.168.60.254; (網關)
12 option subnet-mask 255.255.255.0; (子網掩碼)
13
14 option nis-domain "domain.org";
15 option domain-name "test"; (作用域的名字)
16 filename "pxelinux.0";
17 option time-offset -18000; # Eastern Standard Time
18 # option ntp-servers 192.168.1.1;
19 # option netbios-name-servers 192.168.1.1;
20 # --- Selects point-to-point node (default is hybrid). Don't change this unless
21 # -- you understand Netbios very well
22 # option netbios-node-type 2;
23
24 range dynamic-bootp 192.168.60.1 192.168.60.10;
25 default-lease-time 21600;
26 max-lease-time 43200;
27
28 # we want the nameserver to appear at a fixed address
29 #host AAA{
30 # next-server marvin.redhat.com;
31 # hardware ethernet 00:0C:29:68:2F:9D;
32 # fixed-address 192.168.60.2;
33 #}