搭建自动安装的linux,RedHat7搭建无人值守自动安装Linux操作系统(PXE+Kickstart)
Kickstart服務器
IP: 192.168.136.253 ??掩碼:255.255.255.0 ??網關:192.168.136.2 ??DNS:192.168.136.2
安裝部署yum源服務器
參考 http://www.cnblogs.com/edward2013/p/5020113.html
安裝部署DHCP服務器
# yum -y install dhcp
修改配置文件
#?vi /etc/dhcp/dhcpd.conf
#
# DHCP Server Configurationfile.
# see/usr/share/doc/dhcp*/dhcpd.conf.example
# see dhcpd.conf(5) manpage
#
log-facility local7;
subnet192.168.136.0 netmask 255.255.255.0{
range192.168.136.100 192.168.136.200; #IP地址池范圍
option domain-name "example.com";
option domain-name-servers 192.168.136.2;
option routers192.168.136.2; #路由器IP,可以寫網關IP
default-lease-time 600;
max-lease-time 7200;
next-server 192.168.136.253; #TFTP Server 的IP地址
filename"pxelinux.0"; #pxelinux 啟動文件位置
}
啟動DHCP服務并設置為開機啟動
# systemctl start dhcpd
# systemctl enable dhcpd
安裝部署TFTP服務器
# yum -y install tftp-server
修改配置文件
# vi /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivialfiletransfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation processforsome operating systems.
service tftp
{
socket_type=dgram
protocol=udpwait =yes
user=root
server= /usr/sbin/in.tftpd
server_args= -s /var/lib/tftpboot
disable=no #把這行改成no即可
per_source= 11cps= 100 2flags=IPv4
}
啟動TFTP服務并設置為開機自啟動
# systemctl start tftp
# systemctl enable tftp
將客戶端所需啟動文件復制到TFTP服務器
# yum -y installsyslinux
#cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
復制啟動鏡像文件和啟動配置文件至TFTP共享目錄
# cp /content/rhel7/x86_64/dvd/isolinux/{vmlinuz,initrd.img} /var/lib/tftpboot/#mkdir /var/lib/tftpboot/pxelinux.cfg
#cp /content/rhel7/x86_64/dvd/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
#chmod 644 /var/lib/tftpboot/pxelinux.cfg/default
修改啟動配置文件
#?vi /var/lib/tftpboot/pxelinux.cfg/default
總結
以上是生活随笔為你收集整理的搭建自动安装的linux,RedHat7搭建无人值守自动安装Linux操作系统(PXE+Kickstart)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 树多少钱一方啊?
- 下一篇: 北京环球影城灯光秀时间