pxe安装CentOS6.6系统
时间:2015-06-16 10:18 来源:blog.csdn.net 作者:晓洋
mount
/dev/cdrom
/mnt
rm
-rf
/etc/yum
.repos.d/*
vi
/etc/yum
.repos.d
/base
.repo
[base]
name=base
baseurl=
file
:
///mnt
enabled=1
gpgcheck=0
yum repolist
yum -y
install
dhcp
cp
/usr/share/doc/dhcp-4
.1.1
/dhcpd
.conf.sample
/etc/dhcp/dhcpd
.conf
cat
/etc/dhcp/dhcpd
.conf |
grep
-
v
"^$"
|
grep
-
v
"^#"
option domain-name
"parpar.com"
;
option domain-name-servers 8.8.8.8;
default-lease-
time
3600;
max-lease-
time
7200;
log-facility local7;
subnet 172.168.0.0 netmask 255.255.0.0 {
range 172.168.0.20 172.168.0.30;
option routers 172.168.0.1;
next-server 172.168.0.2;
filename
"pxelinux.0"
;
}
chkconfig dhcpd on
service dhcpd start
yum -y
install
tftp tftp-server
chkconfig tftp on
service xinetd start
yum -y
install
syslinux
cp
/usr/share/syslinux/pxelinux
.0
/var/lib/tftpboot/
cp
/mnt/images/pxeboot/
{vmlinuz,initrd.img}
/var/lib/tftpboot/
cp
/mnt/isolinux/
{vesamenu.c32,boot.msg,splash.jpg}
/var/lib/tftpboot
mkdir
/var/lib/tftpboot/pxelinux
.cfg
cp
/mnt/isolinux/isolinux
.cfg
/var/lib/tftpboot/pxelinux
.cfg
/default
yum -y
install
httpd
mkdir
/var/www/html/centos6
mount
--bind
/mnt
/var/www/html/centos6
service httpd start
yum -y
install
system-config-kickstart
system-config-kickstart
mv
ks.cfg
/var/www/html/
cat
/var/www/html/ks
.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use network installation
url --url=
"http://172.168.0.2/centos6"
repo --name=
"CentOS"
--baseurl=http:
//172
.168.0.2
/centos6
--cost=100
# Root password
rootpw --iscrypted $1$10KAJR0t$WqUKt8fRa24FDPnHZxRTZ1
# System authorization information
auth --useshadow --passalgo=sha512
# Use graphical install
graphical
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone Asia
/Shanghai
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --append=
"crashkernel=auto rhgb quiet"
--location=mbr --driveorder=
"sda"
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part
/boot
--fstype=
"ext4"
--size=200
part swap --size=4000
part / --fstype=
"ext4"
--grow --size=200
%packages
@core
%end
vim
/var/lib/tftpboot/pxelinux
.cfg
/default
label linux
menu label ^Install or upgrade an existing system
menu default
kernel vmlinuz
append ks=http:
//172
.168.0.2
/ks
.cfg initrd=initrd.img
(责任编辑:IT)
(责任编辑:IT) |