搭建自动安装的linux,RedHat7搭建无人值守自动安装Linux操作系统(PXE+Kickstart)

本文档详细介绍了如何配置Kickstart服务器(192.168.136.253)、DHCP服务器和TFTP服务器,以实现自动化Linux系统安装。首先,配置了DHCP服务器的IP地址池、DNS和网关信息。接着,安装并配置了TFTP服务器,启动服务并设置开机启动。最后,复制了所需的启动文件和镜像到TFTP共享目录,并修改了启动配置文件pxelinux.cfg/default。
摘要由CSDN通过智能技术生成

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值