Linux系统下架设DHCP服务器的方法

2009-05-13 01:32:28来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

1、OS系统版本
 
[root@server~]#more/etc/redhat-release
 
RedHatEnterpriseLinuxASrelease4(NahantUpdate4)
 
2、查看系统是否已经安装DHCP服务端软件
 
[root@server~]#rpm-qa|grepdhcp
 
dhcpv6_client-0.10-14_EL4
 
3、将光盘mount上去,然后安装DHCP服务端软件
 
[root@server~]#mount/media/cdrom
 
mount:blockdevice/dev/hdciswrite-protected,mountingread-only
 
[root@serverRPMS]#find/media/cdrom-name"dhcp*"
 
/media/cdrom/RedHat/RPMS/dhcpv6-0.10-14_EL4.i386.rpm
 
/media/cdrom/RedHat/RPMS/dhcpv6_client-0.10-14_EL4.i386.rpm
 
/media/cdrom/RedHat/RPMS/dhcp-3.0.1-58.EL4.i386.rpm
 
/media/cdrom/RedHat/RPMS/dhcp-devel-3.0.1-58.EL4.i386.rpm
 
[root@serverRPMS]#rpm-ivh/media/cdrom/RedHat/RPMS/dhcp-3.0.1-58.EL4.i386.rpm
 
[root@serverRPMS]#rpm-qa|grepdhcp
 
dhcp-3.0.1-58.EL4
 
dhcpv6_client-0.10-14_EL4
 
到这儿已经安装成功了,哈哈
 
4、查看一下,都有那些文件
 
[root@serverRPMS]#rpm-qlgrepdhcp
 
……
 
/etc/dhcpd.conf——dhcp配置文件
 
/etc/rc.d/init.d/dhcpd
 
/etc/rc.d/init.d/dhcrelay
 
/etc/sysconfig/dhcpd
 
/etc/sysconfig/dhcrelay
 
/usr/bin/omshell
 
/usr/sbin/dhcpd
 
/usr/sbin/dhcrelay
 
/usr/share/doc/dhcp-3.0.1
 
/usr/share/doc/dhcp-3.0.1/README
 
/usr/share/doc/dhcp-3.0.1/RELNOTES
 
/usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample——dhcp配置文件的模板
 
/usr/share/man/man1/omshell.1.gz
 
/usr/share/man/man5/dhcp-eval.5.gz
 
/usr/share/man/man5/dhcpd.conf.5.gz
 
/usr/share/man/man5/dhcpd.leases.5.gz
 
/usr/share/man/man8/dhcpd.8.gz
 
/usr/share/man/man8/dhcrelay.8.gz
 
/var/lib/dhcp
 
/var/lib/dhcp/dhcpd.leases——分配IP的那个日志文件
 
5、[root@serverRPMS]#more/etc/dhcpd.conf
 
这儿有没有什么东东的,还是把模板文件COPY过来吧
 
[root@serverRPMS]#cp/usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample/etc/dhcpd.conf
 
6、查看配置文件,并根据自己的要求更改
 
[root@serverRPMS]#more/etc/dhcpd.conf
 
ddns-update-styleinterim;
 
ignoreclient-updates;
 
subnet192.168.0.0netmask255.255.255.0{
 
#——defaultgateway
 
optionrouters192.168.0.1;
 
optionsubnet-mask255.255.255.0;
 
#optionnis-domain"domain.org";
 
optiondomain-name"wiscom.com.cn";
 
optiondomain-name-servers219.141.136.10,211.147.6.3;
 
optiontime-offset-18000;#EasternStandardTime
 
#optionntp-servers192.168.1.1;
 
#optionnetbios-name-servers192.168.1.1;
 
#——Selectspoint-to-pointnode(defaultishybrid)。Don'tchangethisunless
 
#——youunderstandNetbiosverywell
 
#optionnetbios-node-type2;
 
rangedynamic-bootp192.168.0.128192.168.0.254;
 
default-lease-time21600;
 
max-lease-time43200;
 
#wewantthenameservertoappearatafixedaddress
 
hostns{
 
next-servermarvin.redhat.com;
 
hardwareethernet12:34:56:78:AB:CD;

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Fedora8下Apache配置与管理

下一篇:vsftpd本地用户不能登录问题的解决