[root@rhel6 ~]# cp /root/ks.cfg /var/ftp/ks.cfg

[root@rhel6 ~]# cat ks.cfg

#platform=x86, AMD64, 或 Intel EM64T

#version=DEVEL

# Firewall configuration

firewall --disabled

# Install OS instead of upgrade

install

# Use network installation

url --url="ftp://172.16.1.111/rhel6"

# Root password

rootpw --iscrypted $1$7bDwiVJh$DfaDH1d/Yxw5ivOfYO5Q31

# System authorization information

auth  --useshadow  --passalgo=sha512

# Use graphical install

graphical

firstboot --disable

# System keyboard

keyboard us

# System language

lang zh_CN

# 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 --location=mbr

# Clear the Master Boot Record

zerombr

# Partition clearing information

clearpart --all 

# Disk partitioning information

part /boot --fstype="ext4" --size=1024

part /home --fstype="ext4" --size=10240

part swap --fstype="swap" --size=4096

part / --fstype="ext4" --grow --size=1

%post --interpreter=/bin/bash

rm -f /etc/yum.repos.d/*

echo echo '[base]

name=Red Hat Enterprise Linux

baseurl=ftp://172.16.1.111/rhel6

enabled=1

gpgcheck=1

gpgkey=file://etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release' > /etc/yum.repos.d/rhel6.repo

%end

%packages

@additional-devel

@basic-desktop

@chinese-support

@compat-libraries

@debugging

@desktop-debugging

@desktop-platform

@desktop-platform-devel

@development

@eclipse

@emacs

@fonts

@general-desktop

@graphical-admin-tools

@graphics

@hardware-monitoring

@input-methods

@internet-browser

@java-platform

@large-systems

@legacy-unix

@legacy-x

@network-file-system-client

@network-tools

@performance

@perl-runtime

@php

@remote-desktop-clients

@ruby-runtime

@scientific

@security-tools

@storage-client-multipath

@system-admin-tools

@system-management

@system-management-snmp

@technical-writing

@tex

@virtualization

@virtualization-client

@virtualization-platform

@virtualization-tools

@web-server

@web-servlet

@x11

compat-openmpi

compat-openmpi-psm

crypto-utils

hmaccalc

%end

无人值守网络安装LINUX操作系统

 

准备:

1、禁用防火墙、禁用SElinux、配置IP参数,

2、需要YUM环境

3、安装vsftp 启动服务

一、准备RHEL6安装源

[root@rhel6 ~]# mkdir /var/ftp/rhel6

[root@rhel6 ~]# mount /dev/cdrom /var/ftp/rhel6

[root@rhel6 ~]# service vsftpd start

二、安装启动TFPT服务器

[root@rhel6 ~]# yum -y install tftp-server

[root@rhel6 ~]# vim /etc/xinetd.d/tftp

Disable   = no

[root@rhel6 ~]# service xinetd start

三、准备LINUX内核、初始化镜像文件

[root@rhel6 ~]# cd /var/ftp/rhel6/images/pxeboot/

[root@rhel6 pxeboot]# cp vmlinuz initrd.img /var/lib/tftpboot/

四、准备PXE引导程序、启动菜单

[root@rhel6 pxeboot]# yum -y install syslinux

[root@rhel6 pxeboot]# cp /usr/share/syslinux/pxelinux. /var/lib/tftpboot/

[root@rhel6 ~]# mkdir /var/lib/tftpboot/pxelinux.cfg

[root@rhel6 ~]# vim /var/lib/tftpboot/pxelinux.cfg/default

default auto

prompt 

label auto

    kernel vmlinuz

    append ks=ftp://172.16.1.111/rhel6/ks.cfg initrd=initrd.img devfs=nomount ramdisk_size=8192

label linux text

    kernel vmlinuz

    append text initrd=initrd.img devfs=nomount ramdisk_size=

label linux rescue

    kernel vmlinuz

append rescue initrd=initrd.img devfs=nomount ramdisk_size=

五、安装并启动DHCP服务

[root@rhel6 ~]# yum -y install dhcp

[root@rhel6 ~]# vim /etc/dhcp/dhcpd.conf

subnet 172.16.0.0 netmask 255.255.0.0 {

  range 172.16.1.100 172.16.1.200;

  option domain-name-servers 172.16.1.111;

  option domain-name "benet.com";

  option routers 172.16.1.1;

  next-server 172.16.1.111;

  filename "pxelinux.0";

  filename "pxelinux.0";

}
[root@rhel6 ~]# service dhcpd restart

无人值守安装LINUX

一、配置安装应答参数

[root@rhel6 ~]# yum -y install system-config-kickstart

[root@rhel6 ~]# system-config-kickstart

B.复制并验证应答文件ks.cfg

C.测试结果

新建虚拟机无需设置BIOS从Network boot启动,将客户端的IP均设置为DHCP(自动获取方式),即可。

PXE-无人值守安装的更多相关文章

  1. pxe无人值守安装多网卡注意事项

    pxe无人值守安装linux配置这里就不说了,直接看这篇博客http://www.cnblogs.com/mchina/p/centos-pxe-kickstart-auto-install-os.h ...

  2. 《linux就该这么学》第十七节课:第18,19,23章,mariadb数据库、PXE无人值守安装系统和openldap目录服务。

    第23章 (借鉴请改动) openldap数据的特点:1.短小.2.读取次数较多 上述说明: openLDAP服务端配置:     1.yum install -y openldap openldap ...

  3. PXE无人值守安装

    简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作 ...

  4. pxe无人值守安装linux机器笔记

    最近做一些集群的测试的工作,做服务器测试最根本就是要安装系统,曾经我们用十几个光驱并行安装光驱的日子过去了,自从有了pxe一两天搭建好一个集群不是梦!当然做多了集群的搭建工作最多的感受就是,其实运维工 ...

  5. pxe无人值守安装linux机器笔记----摘抄

    1. 基建工作 1.关闭防火墙 a)service iptables stop b)service ip6tables stop c)chkconfig iptables off d)chkconfi ...

  6. PXE+Kickstart+DHCP+TFTP实现无人值守安装操作系统

    PXE+Kickstart+DHCP+TFTP实现无人值守安装操作系统 PXE + Kickstart PXE的工作流程及配置文件 Kickstart的配置文件 Linux安装大致可以分为2个阶段 第 ...

  7. [转]CentOS 6.4下PXE+Kickstart无人值守安装操作系统

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

  8. 第19章 使用PXE+Kickstart部署无人值守安装

    章节概述: 本章节将教会您通过PXE+DHCP+TFTP+VSftpd+Kickstart服务程序搭建出无人值守安装系统,从而批量部署客户机系统. 这种系统能够实现自动化运维.避免了重复性劳动,帮助提 ...

  9. CentOS6 PXE+Kickstart无人值守安装

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

  10. CentOS 6.4下PXE+Kickstart无人值守安装操作系统 转

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

随机推荐

  1. convert转化成特定日期格式

    CONVERT() 函数可以用不同的格式显示日期/时间数据. CONVERT(data_type(length),data_to_be_converted,style) 例子: CONVERT(VAR ...

  2. js缓速运动

    <html> <head> <meta http-equiv="Content-Type" content="text/html; char ...

  3. 移动互联网实战--Apple的APNS桩推送服务的实现(1)

    前记: 相信大家在搞IOS推送服务的开发时, 会直接使用javapns api来简单实现, 调试也直连Apple的APNS服务(产品/测试版)来实现. 很少有人会写个APNS的桩服务, 事实也是如此. ...

  4. dedecms调用子栏目内容,缩略图,以及栏目名字

    织梦后台栏目页默认是没有添加缩略图的选项的,所以首先我们要调整后台提交表单使界面出现上传图片的地方,如下图所示:   织梦后台默认是没有栏目缩略图选项的,所以首先你需要从网上下载对应需要修改的文件,从 ...

  5. 快速对字符转义,避免跨站攻击XSS

    XSS已经成为非常流行的网站攻击方式,为了安全起见,尽量避免用户的输入.可是有些情况下不仅不避免,反而要求鼓励输入,比如写博客.博客园开放性很高,可以运行手写的JS.之前比较著名的例子就是,凡是看到某 ...

  6. spark-scheduled调度算法

    1.3源码是如此,后面新版本源码会尽可能的根据用户shell配置的参数进行分配 1.spareadOutApps 尽可能分配到多的机器上面execute和CPU core 2.非spareadouta ...

  7. URAL 1085 Meeting(最短路)

    Meeting Time limit: 2.0 secondMemory limit: 64 MB K friends has decided to meet in order to celebrat ...

  8. Ubuntu安装Mysql+Django+MySQLdb

    安装Mysql sudo apt-get install mysql-server mysql-client root@IdeaPad:/# mysql -u root -p Enter passwo ...

  9. 黑马程序员——JAVA基础之 == 和equals区别

    java中 == 和equals区别: java中的数据类型,可分为两类: 1.基本数据类型,也称原始数据类型.byte,short,char,int,long,float,double,boolea ...

  10. C#联调C++项目

    很多人在编写C#代码时,经常要调用C++代码,有时我们通常用打日志来查看运行状况,这当然可以,不过这样挺不方便,一遍遍的跑代码,一遍遍的看日志,感觉如果可以直接把断点打入C++的代码就好了,其实是可以 ...