- yum -y install dhcp*
- yum -y install tftp*
- yum -y install nfs
- 修改tftp配置文件
default: off
description: The tftp server serves files using the trivial file transfer \
protocol. The tftp protocol is often used to boot diskless \
workstations, download configuration files to network-aware printers, \
and to start the installation process for some operating systems.
service 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
}
Disable 的yes改成no
5挂载光盘
mount /dev/cdrom /mnt/
ln -s /var/lib/tftpboot/ /
6查找是否有
find / -name “pxelinux.0”
没有
yum -y install syslinux
7cd /tftpboot/
拷贝到当前目录
cp /usr/share/syslinux/pxelinux.0 .
8
cp /mnt/images/pxeboot/vmlinuz .
cp /mnt/images/pxeboot/initrd.img .
mkdir -p pxelinux.cfg
cd pxelinux.cfg
vi default
cp /mnt/isolinux/isolinux.cfg default
9修改default
加入
append ks=nfs:192.168.118.129:/centosinstall/ks.cfg ksdevice=eno16777736 initrd=initrd.img
10
mkdir -p centosinstall
cd centosinstall
touch ks.cfg
nohup cp -r /mnt/* .&
echo “/centosinstall *(rw,sync)” >>/etc/exports
11把root下的ks文件拷贝过来替换我们新建的ks.cfg
Chmod -R 777 ks.cfg
nfs --server = 192.168.118.128 --dir=/centosinstall
key --skip
#version=DEVEL
System authorization information
auth --enableshadow --passalgo=sha512
Use CDROM installation media
cdrom
Use graphical install
graphical
Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
Keyboard layouts
keyboard --vckeymap=cn --xlayouts=‘cn’
System language
lang zh_CN.UTF-8
Network information
network --bootproto=dhcp --device=eno16777736 --ipv6=auto --activate
network --hostname=localhost.localdomain
Root password
rootpw --iscrypted 666gOzCMqr2XslPwOHO$PoYoP4x84G7yxIqp6iyi1f8opCVpwejRYpWlzkB6ahpL6.OB4HAInccUc1nvGB5dug9nGBmmGSDHgsdiUeUO/.
System timezone
timezone Asia/Shanghai --isUtc
System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
autopart --type=lvm
Partition clearing information
clearpart --none --initlabel
%packages
@^minimal
@core
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb=‘auto’
%end
12修改dhcp配置文件
ddns-update-style interim;
ignore client-updates;
next server 192.168.118.129;
filename “pxelinux.0”;
allow booting;
allow bootp;
subnet 192.168.118.0 netmask 255.255.255.0{
option routers 192.168.118.1;
option subnet-mask 255.255.255.0;
host ns{
hardware ethernet 00:0c:29:55:f2:f9;
fixed-address 192.168.118.105;
}
}
启动nfs’服务
Dhcp服务
安装虚拟机就可以使用了,失败了,改天再战
本次安装由于涉及很多服务,准备等其他服务深造一下再战,毕竟没有歌谣解决不了的难题