Linux—图解PXE实现全自动安装系统(2)

5、具体实现如下:

1、安装dhcp、自定义作用域


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
yum install dhcp -y
[root@localhost ~]# rpm -ql dhcp
/etc/dhcp
/etc/dhcp/dhcpd.conf
subnet 172.16.0.0netmask 255.255.0.0{
range 172.16.5.10172.16.5.20;
option routers 172.16.0.1;
next-server 172.16.5.2;
filename "pxelinux.0";
}
host webserver1 {
hardware ethernet 00:0C:29:8C:C8:A4;
fixed-address 172.16.5.100;
option routers 172.16.0.1;
option domain-name "http://il23f.blog.51cto.com";
option domain-name-servers 172.16.0.1,8.8.8.8;
}


  验证dhcpd进程是否处于监听状态

1
2
3
4
5
[root@localhost ~]# ps aux | grep dhcp
dhcpd     1708  0.0  0.8  48908  4308 ?        Ss   20:27   0:00 /usr/sbin/dhcpd-user dhcpd -group dhcpd
root      2844  0.0  0.1 103252   828 pts/0S+   21:51   0:00 grepdhcp
[root@localhost ~]# ss -unl | grep :67
UNCONN     0      0                         *:67                       *:*

2、配置TFTP

1
2
3
4
5
6
yum -y installxinetd tftp-server tftp
chkconfig xinetd on
chkconfig tftp on
service xinetd start
[root@localhost ~]# ss -unl | grep :69
UNCONN     0      0                         *:69                       *:*

3、准备安装树

1
2
3
mkdir/var/www/html/centos6
mount--bind /media/cdrom/var/www/html/centos6
service httpd start



本文转自 佛哒 51CTO博客,原文链接:http://blog.51cto.com/fodaa/1950562,如需转载请自行联系原作者

上一篇:Java邮件群发(web版)


下一篇:如何从系统盘快照复制数据