包准备:xinetd,tftp-server,dhcp,httpd,system-config-kickstart,syslinux,nfs
 
试验环境:
本机地址:192.168.46.98
本地网关:192.168.46.254
 
配置DHCP服务器:
 
Sample:
 

  subnet 192.168.46.0 netmask 255.255.255.0 {
  range 192.168.46.100 192.168.46.105;
  option routers 192.168.46.254;
  default-lease-time 600;
  max-lease-time 7200;
  next-server 192.168.46.98;    /*指向tftp服务器*/
  filename="pxelinux.0"; }        /*ftp根目录的相对路径*/

 
参考文件:
ddns-update-style interim; /*dhcp支持的dns动态更新方式*/
ignore client-updates; /*忽略客户端DNS动态更新*/
authoritative; /*授权*/
allow booting; /*支持PXE启动*/
allow bootp; /*支持boottp*/
subnet 192.168.129.0 netmask 255.255.255.0 { /*作用域*/
range 192.168.129.30 192.168.129.78; /*ip地址段范围*/
option routers 192.168.129.1; /*网关*/
option subnet-mask 255.255.255.0; /*子网掩码*/
option domain-name-servers 203.103.24.68; /*DNS服务器的地址*/
default-lease-time 21600; /*租期,秒数*/
max-lease-time 43200; /*最大租期,秒数*/
next-server 192.168.129.22; /*TFTPServer的IP*/
filename "/pxelinux.0"; /*Bootstrap文件*/
 
挂载系统光盘到 /mnt
 
配置TFTP根目录(tftpboot)
# cp /mnt/images/pxeboot/vmlinuz  /mnt/images/pxeboot/initrd.img  /var/lib/tftpboot
# cp /mnt/isolinux/boot.msg /mnt/isolinux/splash.jpg  /var/lib/tftpboot
# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
# mkdir /var/lib/tftpboot/pxelinux.cfg
# cp -p /media/cdrom/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
 
TFTP下default配置
# vi /var/lib/tftpboot/pxelinux.cfg/default
 
 

default linux
#prompt 1
timeout 600
display boot.msg
menu background splash.jpg
menu title Welcome to Red Hat Enterprise Linux 6.4!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000
label local
  localboot 0
label linux
  kernel vmlinuz
  append initrd=initrd.img devfs=nomount ks=http://192.168.46.98/ks.cfg

 
NFS共享目录配置
# vi /etc/exports
 

/mnt 192.168.46.0/255.255.255.0(ro,sync)

 
配置Kickstart文件ks.cfg
# cd /var/www/html
# vi ks.cfg

#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --enabled --ssh
# Install OS instead of upgrade
install
# Use NFS installation media
nfs --server=192.168.46.98 --dir=/mnt
# Root password
#rootpw --iscrypted $1$kC9vxUwe$l.U7ZGNt9Yjcvt2YHy3J50
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use text mode install
text
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone --isUtc 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 --initlabel
# Disk partitioning information
part /boot --asprimary --fstype="ext4" --size=128
part swap --asprimary --fstype="swap" --size=2048
part / --asprimary --fstype="ext4" --size=8000
part /data --asprimary --fstype="ext4" --size=1
 
%packages
@base
@chinese-support
%end

 
 
开启服务
tftp包含于xinetd中,所以要进入配置文件中开启
# vi /etc/xinetd.d/tftp
 

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
}

开启
# service dhcpd start

# service xinetd start
# service httpd start
# service nfs start

[基础]RHEL6下LINUX服务器批量部署的更多相关文章

  1. linux服务器批量部署应用系统shell脚本(Tomcat/jetty)

    linux服务器批量部署应用系统shell脚本: 1.请更换代码内的服务器地址(Tomcat或jetty服务器) serverRoot=/home/undoner/java_tool/apache-t ...

  2. windows下运行的linux服务器批量管理工具(带UI界面)

    产生背景: 由于做服务器运维方面的工作,需要一人对近千台LINUX服务器进行统一集中的管理,如同时批量对LINUX服务器执行相关的指令.同时批量对LINUX服务器upload程序包.同时批量对LINU ...

  3. 如何在Linux服务器上部署禅道

    最近换了新的项目团队,由于新团队比较年轻化,没有实行正规的项目管理,于是我自告奋勇要为团队管理出一份力,帮助团队建立敏捷化的项目管理,经过多方考究和对比后,选择了目前较受欢迎的开源项目管理软件:禅道. ...

  4. Ubuntu下Zabbix服务器监控工具部署

    Ubuntu下Zabbix服务器监控工具部署 一 安装安装Apache.Mysql.Php.zabbix sudo apt-get update sudo apt-get install apache ...

  5. 详解Linux系统下PXE服务器的部署过程

    在大规模安装服务器时,需要批量自动化方法来安装服务器,来减少日常的工作量. 但是批量自动化安装服务器的基础是网络启动服务器(bootserver). 下面我们就介绍一下 网络启动服务器的 安装和配置方 ...

  6. 零基础在Linux服务器上部署javaweb项目

    本教程使用的工具下载链接:http://pan.baidu.com/s/1sl1qz2P 密码:43pj 一.安装JDK 1.首先要查看服务器的系统版本,是32位还是64位 #getconf LONG ...

  7. linux下远程服务器批量执行命令及SFTP上传文件 -- python实现

    之前写过一个python远程执行命令的脚本,但在一个性能测试中,要将程序批量分发到不同服务器,程序无法使用,再将之前的脚本更新,加入批量上传的功能.之前脚本地址:http://www.cnblogs. ...

  8. linux服务器上部署jdk+tomcat+rocketmq+redis-cluster

    通常我们拿到一组干净的linux服务器,需要初始化安装一些基础软件,这里一站式介绍部署jdk+tomcat+rocketmq+redis-cluster 前言:如果要在多台服务器上安装,在一台服务器上 ...

  9. [Mongodb] 借mongodb被入侵勒索事件,谈下Linux服务器端口安全问题

    一.缘由: 最近几天Mongodb勒索事件甚嚣尘上:由于对外网开放访问并且没有开启授权机制被删库.远程拖库.勒索.接着又曝出Elasticsearch被勒索事件,缘由一样,Elasticsearch服 ...

随机推荐

  1. IOS开发中怎样验证邮箱的合法性

    IOS开发中怎样验证邮箱的合法性 文章参考:http://www.codes51.com/article/detail_94157.html 代码: - (void)viewDidLoad { [su ...

  2. 接口自动化测试:Thrift框架RPC协议客户端开发

    import java.lang.Thread.State;import java.util.Iterator;import java.util.List; import org.apache.thr ...

  3. Appium Android Bootstrap源码分析之启动运行

    通过前面的两篇文章<Appium Android Bootstrap源码分析之控件AndroidElement>和<Appium Android Bootstrap源码分析之命令解析 ...

  4. Appium Android Bootstrap源码分析之命令解析执行

    通过上一篇文章<Appium Android Bootstrap源码分析之控件AndroidElement>我们知道了Appium从pc端发送过来的命令如果是控件相关的话,最终目标控件在b ...

  5. FlexiGrid使用手册

    FlexiGrid使用手册 一.概览 Flexigrid是一个基于jQuery开发的Grid,与 Ext Gird类似.Flexigrid显示的数据能够通过Ajax获取或者从一个普通的表格转换. 它的 ...

  6. Oralce 处理字符串函数

    原文:Oralce 处理字符串函数 平常我们用Oracle主要有两种字符串类型1.char始终为固定的长度,如果设置了长度小于char列的值,则Oracle会自动用空格填充的.当比较char时,Ora ...

  7. Android使用OpenGL ES2.0显示YUV,您的手机上的数据要解决两个方面的坐标

    如果说 ,我不知道,如果你不明白这个话题.连接到:http://blog.csdn.net/wangchenggggdn/article/details/8896453(下称链接①), 里面评论有非常 ...

  8. 使用SQL Server 2005数据库管理工具 - 初学者系列 - 学习者系列文章

    本文讲述使用SQL Server 2005 Express数据库管理工具的使用. 1.打开数据库管理工具 2.选择下面的SQL Server 身份验证,因为在安装数据库的时候设置了sa的密码. 3.选 ...

  9. LeetCode之Reverse Words in a String

    1.(原文)问题描述 Given an input string, reverse the string word by word. For example, Given s = "the ...

  10. 使用UDL文件来测试SQL Server数据库连接

    原文 来自http://www.2cto.com/database/201308/234427.html 使用UDL测试SQL Server连接问题   做数据库经常会遇到SQL Server连接的问 ...