kickstart自动化系统安装

kickstart自动化linux系统安装

一、系统环境

redhate 6.3

IP:10.240.240.210,  Gateway: 10.240.240.1

二 、使用yum方式安装软件包

yum install -y tftp* xinetd "*dhcp*" nfs-utils-*

三、配置dhcp服务器

配置DHCP服务器的配置文件

[[email protected] tftpboot]# vi /etc/dhcpd.conf

# DHCP Server Configuration file.

#   see /usr/share/doc/dhcp*/dhcpd.conf.sample

#   see ‘man 5 dhcpd.conf‘

ddns-update-style interim;

ignore client-updates;

filename "/pxelinux.0";

next-server 10.240.240.210;

allow booting;

allow bootp;

subnet 10.240.240.0 netmask 255.255.255.0 {

# --- default gateway

option routers                  10.240.240.1;

option subnet-mask              255.255.255.0;

option nis-domain               "jiayuan.com";

option domain-name              "jiayuan.com";

option domain-name-servers      10.240.210.98;

option time-offset              -18000; # Eastern Standard Time

#       option ntp-servers              10.240.210.98;

#       option netbios-name-servers     10.240.210.98;

# --- Selects point-to-point node (default is hybrid). Don‘t change this unless

# -- you understand Netbios very well

#       option netbios-node-type 2;

range dynamic-bootp 10.240.240.220 10.240.240.240;

default-lease-time 21600;

max-lease-time 43200;

# we want the nameserver to appear at a fixed address

host ns {

next-server marvin.redhat.com;

hardware ethernet 12:34:56:78:AB:CD;

fixed-address 207.175.42.254;

}

}

四、配置tftp服务器

配置tftp服务器的配置文件

[[email protected] tftpboot]# vi /etc/xinetd.d/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             = -u nobody -s /tftpboot #指定目录

disable                 = no  #将yes改为no

per_source              = 11

cps                     = 100 2

flags                   = IPv4

}

五、配置NFS服务器,添加共享目录

[[email protected] ~]# vi /etc/exports

/mnt/cdrom *(ro,sync)

/tftpboot *(ro,sync)

六、复制pxelinux.0、initrd.img、vmlinuz、isolinux/*.msg 到/tftpboot/目录下

1、正常情况下linux系统没有安装syslinux包,需要安装syslinux包

yum install -y syslinux

syslinux包安装完后会在/usr/share/syslinux/

先 cp -r /usr/share/syslinux/ /usr/lib/

2、新建一个/mnt/cdrom目录,把镜像的iso文件挂载到/mnt/cdrom下

3、如果没有/tftpboot/目录先建立一个

mkdir /tftpboot/

cp /usr/lib/syslinux/pxelinux.0 /tftpboot/

cp /mnt/cdrom/images/pxeboot/{initrd.img,vmlinuz} /tftpboot/

cp /mnt/cdrom/isolinux/*.msg /tftpboot

4、配置default文件

mkdir /tftpboot/pxelinux.cfg

touch /tftpboot/pxelinux.cfg/default

vi /tftpboot/pxelinux.cfg/default

default linux

prompt 1

timeout 600

display boot.msg

label linux

kernel vmlinuz

append initrd=initrd.img nofb text  ks=nfs:10.240.240.210:/tftpboot/ks.cfg

label text

kernel vmlinuz

append initrdinitrd=initrd.img text

label ks

kernel vmlinuz

append ks initrdinitrd=initrd.img

label local

localboot 1

label memtest86

kernel memtest

append -

Pxe已经完成了,想用ks完成全自动安装的可以往下看。

七、使用kickstarter配置安装文件。

[[email protected] tftpboot]# pwd

/tftpboot

[[email protected] tftpboot]# ls

boot.msg  initrd.img  pxelinux.0  pxelinux.cfg  vmlinuz

[[email protected] tftpboot]# vi ks.cfg

install

nfs --server=10.240.240.210 --dir=/mnt/cdrom

text

key --skip

keyboard us

lang en_US.UTF-8

skipx

network --device eth0 --bootproto dhcp

rootpw root

firewall --disabled

authconfig --enableshadow --enablemd5

selinux --disabled

timezone --utc Asia/Shanghai

bootloader --location=mbr --driveorder=sda

zerombr yes

clearpart --all

part /boot --fstype ext4 --size=200

part /     --fstype ext4 --size=20000

part swap  --fstype swap --size=8192

part /u01  --fstype ext4 --grow --size=200

reboot

%packages

@base

@core

@server-policy

ipmitool

OpenIPMI

openssh-clients

net-snmp

%post

八、把/tftpboot/ 目录的权限修改为最大

chmod 777 /tftpboot/ -R

九、关闭防火墙并启动相关的服务

1、关闭防火墙

service iptables stop

2、关闭selinux (关闭后重启机器)

vi /etc/selinux/config

SELINUX=disabled

3、启动服务

service dhcpd start

service xinetd start

service rpcbind start

service nfslock start

service nfs start

4、把上面的服务写到启动项

vi /etc/rc.local

service iptables stop

service dhcpd start

service xinetd start

service rpcbind start

service nfslock start

service nfs start

kickstart自动化系统安装,布布扣,bubuko.com

时间: 2024-07-30 08:02:47

kickstart自动化系统安装的相关文章

RHEL7/CentOS7 pxe+kickstart自动化系统安装

PXE(preboot execute environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服务器下载映像,并由此支持通过网络启动操作系统,在启动过程中,终端要求服务器分配IP地址,再用TFTP(trivial file transfer protocol)或MTFTP(multicast trivial file transfer protocol)协议下载一个启动软件包到本机内存中执行,由这个启动软件包

kickstart自动化安装--tftp+nfs+dhcp

使用kickstart实现Centos 自动化安装 Kickstart自动化安装简介: 规模化:同时装配多台 服务器 自动化 :安装系统,配置各种服务 远程实现:不需要光盘,U盘等安装介质 优势: (1)流线自动化的安装 (2)快速大量的裸机部署 (3)强制建立的一致性(软件包,分区,配置,监控,安全性) (4)减少人为的部署失误 使用Kickstart方法安装的过程: (1). 创建一个kickstart文件 (2). 创建有kickstart文件的引导介质或者使这个文件在网络上可用: (3)

使用Kickstart自动化安装CentOS6.5

使用Kickstart自动化安装CentOS6.5 作者:Todd Liu       时间:2018年5月28日 本文介绍PXE方式引导自动化安装CentOS6.5系统,主要用到的系统服务有DHCP.TFTP.Vsftpd和Kickstart.通过配置Kickstart自动化应答脚本,实现客户端批量.无人值守安装系统. 1. PXE介绍 PXE(Preboot Execution Environment,预启动执行环境)由Intel公司开发,工作于Client/Server的网络模式,支持客户

Kickstart自动化安装

Kickstart自动化安装 首先需要安装软件: Yum install –y dhcp* tftp*  nfs-utils Yum install –y syslinux  (没有pxelinux.0需要安装syslinux) 1.配置tftp服务器: Vi /etc/xinetd.d/tftp 把 disable = yes 改为no 就可以了 2.TFTP+PXE配置 要实现远程安装系统,需要在tftpboot目录指定相关PXE内核模块及相关参数.配置步骤如下: Mount /dev/cd

Redhat 7 配置Kickstart自动化部署多种系统

使用kickstart自动化部署多种系统,我想到的有两种场景,一种适合于日常运维,当机房上架个别新增的服务器时,根据不同的用途需求,通过一个多系统的启动菜单,输入相应的操作系统名称,即可自动化部署对应的操作系统.例如我在网上看到如下图这样的方案: 但是在第二种场景即系统集成项目中,如果同时要安装50台.100台的话,每台都要去输入,那也真是令人蛋疼了.系统集成项目通常会遇到服务器数量较多.且不同的项目对操作系统的需求不同的情况,如果准备一台Kickstart一次只是推送一种操作系统的自动化部署,

Kickstart自动化安装部署Centos系统平台的搭建

先上拓扑图吧 0.使用虚拟机做实验的规划 1.ip地址的规划,模板练习机器1对应10.0.0.11,依次类推 2.所有的服务器配置好epel源 3.所有的服务器都要做内核优化(基本) 4.每个实验都要有详细的文档 5.模拟实验故障,并做记录 6.所用系统均为centos6.5for 64bit 内核版本号为2.6.32-431 一.部署Kickstart自动化安装系统平台 第一部分:基本准备篇 实验环境为centos6.5for 64bit 经验:建议安装kickstart-server为min

kickstart自动化安装过程(搜索整理)

Kickstart自动安装配置文档(NFS+http版本) 一.什么是PXE?PXE(preboot execute environment,预启动执行环境)是由Intel公司开发的最新技术, 工作于Client/Server的网络模式.严格来说,PXE 并不是一种安装方式,而是一种引导方式.进行 PXE 安装的必要条件是在要安装的计算机中必须包含一个 PXE 支持的网卡(NIC),即网卡中必须要有 PXE Client.PXE (Pre-boot Execution Environment)协

DHCP+VSFTPD+TFTP+Kickstart搭建PXE环境实现批量自动化系统安装

一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作站通过网络从远端服 务器下载映像,并由此支持通过网络启动操作系统,在启动过程中,终端要求服务器分配IP地址,再用TFTP(trivial file transfer protocol)或MTFTP(multicast trivial file transfer protocol)协议下载一个启动

DHCP+HTTP+KICKSTART自动化光盘启动部署服务器

自动化光盘启动部署服务器 这里是通过虚拟机进行实际部署前的测试,完全可用于实际的部署工作,完成后可实现一张自制启动光盘和一台可装有HTTP和DHCP服务的linux系统服务器自动化安装操作系统. 虚拟环境: 操作系统  rhel-server-5.4-x86    IP:192.168.1.3 客户端需要安装的系统:rhel-server-5.4-x86 NOTICE:网络自动化安装操作系统,需要客户端支持网卡启动和PXE功能. 实施步骤: 一.配置DHCP服务器: 1)安装DHCP服务器 [[