打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
DHCP--CentOS4.5
os: CentOS 4.5
[root@CentOS ~]# rpm -qa |grep dhcp
dhcpv6_client-0.10-17_EL4
[root@CentOS ~]# yum -y install dhcp dhcp-devel
Setting up Install Process
Setting up repositories
dag                       100% |=========================| 1.1 kB    00:02
update                    100% |=========================|  951 B    00:00
base                      100% |=========================| 1.1 kB    00:00
addons                    100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 1.5 MB    06:57
dag       : ################################################## 6450/6450
Added 6450 new packages, deleted 0 old in 256.59 seconds
primary.xml.gz            100% |=========================|  57 kB    00:00
update    : ################################################## 202/202
Added 202 new packages, deleted 0 old in 10.13 seconds
primary.xml.gz            100% |=========================| 580 kB    00:33
base      : ################################################## 1518/1518
Added 1518 new packages, deleted 0 old in 71.83 seconds
primary.xml.gz            100% |=========================|  157 B    00:00
Added 0 new packages, deleted 0 old in 0.02 seconds
primary.xml.gz            100% |=========================|  36 kB    00:00
extras    : ################################################## 147/147
Added 147 new packages, deleted 0 old in 5.23 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for dhcp to pack into transaction set.
dhcp-3.0.1-59.EL4.i386.rp 100% |=========================|  20 kB    00:01
---> Package dhcp.i386 7:3.0.1-59.EL4 set to be updated
---> Downloading header for dhcp-devel to pack into transaction set.
dhcp-devel-3.0.1-59.EL4.i 100% |=========================|  19 kB    00:01
---> Package dhcp-devel.i386 7:3.0.1-59.EL4 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
dhcp                    i386       7:3.0.1-59.EL4   base              564 k
dhcp-devel              i386       7:3.0.1-59.EL4   base              108 k
Transaction Summary
=============================================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 672 k
Downloading Packages:
(1/2): dhcp-3.0.1-59.EL4. 100% |=========================| 564 kB    00:28
(2/2): dhcp-devel-3.0.1-5 100% |=========================| 108 kB    00:05
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 443e1821
Public key for dhcp-3.0.1-59.EL4.i386.rpm is not installed
Retrieving GPG key fromhttp://mirror.centos.org/centos/RPM-GPG-KEY-centos4
Importing GPG key 0x443E1821 "CentOS-4 key <centos-4key@centos.org>"
Key imported successfully
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: dhcp                         ######################### [1/2]
Installing: dhcp-devel                   ######################### [2/2]
Installed: dhcp.i386 7:3.0.1-59.EL4 dhcp-devel.i386 7:3.0.1-59.EL4
Complete!
[root@CentOS ~]# cat /etc/dhcpd.conf
#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
[root@CentOS ~]# rm /etc/dhcpd.conf
[root@CentOS ~]# cp /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample /etc/dhcpd.conf
[root@CentOS ~]# vi /etc/dhcpd.conf
[root@CentOS ~]# ll /var/lib/dhcp/dhcpd.leases
-rw-r--r--  1 root root 0 May  3 09:25 /var/lib/dhcp/dhcpd.leases
#[root@CentOS ~]# service dhcpd start
Starting dhcpd:        [  OK  ]
[root@CentOS ~]# chkconfig --list dhcpd
dhcpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@CentOS ~]# chkconfig dhcpd on
[root@CentOS ~]# chkconfig --list dhcpd
dhcpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@CentOS ~]# cat /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates; subnet 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
option routers                  192.168.1.1;
option subnet-mask              255.255.255.0;
#       option nis-domain               "domain.org";
#       option domain-name              "domain.org";
option domain-name-servers      202.96.128.166;
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.1.200 192.168.1.230;
default-lease-time 21600;
max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
参考资料:
http://www.lhes.tcc.edu.tw/phpbb2/printview.php?t=372&start=0
http://www.ihao.org/dz5/viewthread.php?tid=42
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
CentOS 5.2 下配置DHCP服务器全过程
CentOs/安装XEN配置笔记
CentOS上yum安装JDK1.6
linux yum 命令 | 菜鸟教程
阿里云CentOS 7.1使用yum安装MySql5.6.24
中国Linux公社 -viewtopic-使用apt-rpm 简化你的rh,fc rpm包...
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服