码迷,mamicode.com
首页 > 系统相关 > 详细

Linux-CentOS6.4-PXE-DHCP-FTP

时间:2015-08-29 22:57:33      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:

DHCP服务器地址:192.168.1.100
TFTPfFF服务器地址:192.168.1.100
FTP服务器地址:192.168.1.100
安装树目录:/var/ftp/pub
引导程序目录:/var/lib/tftpboot
ks.cfg位置:/var/ftp/

1.install and configure DHCP
yum install dhcp -y

#==========================vi /etc/dhcp/dhcpd.conf==========================
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 192.168.1.110;
filename="pxelinux.0";
option domain-name "www.baxk.com";
option domain-name-servers 192.168.1.110;
option time-offset -18000;
range dynamic-bootp 192.168.1.200 192.168.1.250;
default-lease-time 21600;
max-lease-time 43200;
host ns {
hardware ethernet 00:0C:29:BB:0E:20;
fixed-address 192.168.1.110;
next-server 192.168.1.110;

}
#==========================vi /etc/dhcp/dhcpd.conf==========================


vi /etc/init.d/dhcpd
#==========================vi /etc/init.d/dhcpd=============================
user=root
group=root
#==========================vi /etc/init.d/dhcpd=============================

service dhcpd start
chkconfig dhcpd on


2. install and configure vsftpd tftp

yum install vsftpd tftp-server -y

#==========================/etc/xinetd.d/tftp==========================
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
#==========================/etc/xinetd.d/tftp==========================

service xinetd start
netstat -tupln |grep 69
chkconfig xinetd on

3.copy boot file from CDROM

mkdir /media/CentOS
mount -t auto /dev/cdrom  /media/CentOS


cd /var/lib/tftpboot

mkdir pxelinux.cfg
cp /media/cdrom/isolinux/vmlinuz ./
cp /media/cdrom/isolinux/initrd.img ./

yum install syslinux -y
cp /usr/share/syslinux/vesamenu.c32 ./
cp /usr/share/syslinux/pxelinux.0 ./
cp /media/cdrom/isolinux/isolinux.cfg pxelinux.cfg/default

#==========================default==========================
label linux
menu label ^Install or upgrade an existing system
menu default
kernel vmlinuz
append initrd=initrd.img ks=ftp://192.168.1.100/ks.cfg
......
#==========================default==========================

4.
yum groupinstall "X Window System"
yum groupinstall Desktop
system-config-kickstart
Kernel-Parameters = quite rhgb
%packages --nobase
@core

5.settings
service iptables stop
chkconfig iptables off
setenforce 0
getenforce

Linux-CentOS6.4-PXE-DHCP-FTP

标签:

原文地址:http://www.cnblogs.com/baxk/p/4769855.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!