1、设置网络参数
[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:0C:29:75:17:03
ONBOOT=yes
IPADDR=192.168.10.253
NETMASK=255.255.255.0
[root@localhost ~]# grep server01 /etc/hosts //非必须
192.168.10.253 server01.example.com server01
2、创建YUM源
3配置DHCP(给需要安装系统的主机分配ip)
[root@server01 ~]# yum -y install dhcp
[root@server01 ~]# cat /etc/dhcpd.conf
ddns-update-style interim;
default-lease-time 21600;
max-lease-time 43200;
option routers 192.168.10.254;
option domain-name "zwltc.com";
option domain-name-servers 192.168.10.253;
next-server 192.168.10.253;
filename "pxelinux.0";
subnet 192.168.10.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.10.1 192.168.10.100;
}
[root@server01 ~]# service dhcpd restart
[root@server01 ~]# chkconfig dhcpd on
[root@server01 ~]# netstat -tulnp | grep :67
udp 0 0 0.0.0.0:67 0.0.0.0:* 5219/dhcpd
4配置DNS //非必须的
[root@server01 ~]# yum -y install bind bind-chroot caching- nameserver
[root@server01 ~]# cd /var/named/chroot/etc/
[root@server01 etc]# cp -p named.caching-nameserver.conf named.conf
[root@server01 etc]# vim named.conf
...
15 listen-on port 53 { 192.168.10.253; };
16 // listen-on-v6 port 53 { ::1; };
...
27 allow-query { any; };
28 allow-query-cache { any; };
...
37 match-clients { any; };
38 match-destinations { any; };
[root@server01 etc]# vim named.rfc1912.zones
...
51 zone "zwltc.com" IN {
52 type master;
53 file "zwltc.com.zone";
54 };
[root@server01 etc]# named-checkconf named.conf
[root@server01 etc]# cd /var/named/chroot/var/named/
[root@server01 named]# cp -p named.local zwltc.com.zone
[root@server01 named]# cat zwltc.com.zone
$TTL 86400
@ IN SOA localhost. root.localhost. (
2014061801 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS server01.zwltc.com.
server01 IN A 192.168.10.253
$GENERATE 1-100 station$ IN A 192.168.10.$
[root@server01 named]# named-checkzone zwltc.com zwltc.com.zone
zone zwltc.com/IN: loaded serial 2014061801
OK
[root@server01 named]# service named restart
[root@server01 named]# chkconfig named on
5 配置TFTP
[root@server01 ~]# rpm -q tftp-server
tftp-server-0.49-2
[root@server01 ~]# vim /etc/xinetd.d/tftp
...
13 server_args = -s /tftpboot
14 disable = no
...
[root@server01 ~]# service xinetd restart
[root@server01 ~]# chkconfig xinetd on
[root@server01 ~]# netstat -tulnp | grep xinetd
udp 0 0 0.0.0.0:69 0.0.0.0:* 5842/xinetd
[root@server01 ~]# rpm -ql syslinux | grep pxelinux.0
/usr/share/syslinux/gpxelinux.0
/usr/share/syslinux/pxelinux.0
[root@server01 ~]# mkdir /tftpboot/pxelinux.cfg
oot@server01 ~]# cp /var/ftp/pub/iso/rhel5.10/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
[root@server01 ~]# cp /usr/share/syslinux/pxelinux.0 /tftpboot/
[root@server01 ~]# cp /var/ftp/pub/iso/rhel5.10/isolinux/vmlinuz /tftpboot/
[root@server01 ~]# cp /var/ftp/pub/iso/rhel5.10/isolinux/initrd.img /tftpboot/
配置ftp
[root@server01 ~]# yum -y install vsftpd
[root@server01 ~]# tail -n 1 /etc/vsftpd/vsftpd.conf
anon_root=/data/iso/rhel5.10
[root@server01 ~]# service vsftpd restart
[root@server01 ~]# chkconfig vsftpd on
通过Kickstart实现无人值守安装(接着实验一)
[root@localhost ~]# yum -y install system-config-kickstart
一步步做就行了(key --skip)