1、系统环境

Centos 5.5

IP:192.168.11.5,  Gateway: 192.168.11.1

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

  1. yum install -y tftp* xinetd dhcpd

3 、配置dhcp服务器

  1. cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
  2. [root@localhost tftpboot]# vi /etc/dhcpd.conf
  3. ddns-update-style interim;
  4. ignore client-updates;
  5. filename "/pxelinux.0";
  6. next-server 192.168.11.5;
  7. allow booting;
  8. allow bootp;
  9. subnet 192.168.11.0 netmask 255.255.255.0 {
  10. # --- default gateway
  11. option routers                  192.168.11.1;
  12. option subnet-mask              255.255.255.0;
  13. option nis-domain               "domain.org";
  14. option domain-name              "domain.org";
  15. option domain-name-servers      192.168.11.1;
  16. option time-offset              -18000; # Eastern Standard Time
  17. #       option ntp-servers              192.168.1.1;
  18. #       option netbios-name-servers     192.168.1.1;
  19. # --- Selects point-to-point node (default is hybrid). Don't change this unless
  20. # -- you understand Netbios very well
  21. #       option netbios-node-type 2;
  22. range dynamic-bootp 192.168.11.128 192.168.11.254;
  23. default-lease-time 21600;
  24. max-lease-time 43200;
  25. # we want the nameserver to appear at a fixed address
  26. host ns {
  27. next-server marvin.redhat.com;
  28. hardware ethernet 12:34:56:78:AB:CD;
  29. fixed-address 207.175.42.254;
  30. }
  31. }

4、配置tftp服务器

  1. [root@localhost tftpboot]# vi /etc/xinetd.d/tftp
  2. # default: off
  3. # description: The tftp server serves files using the trivial file transfer \
  4. #       protocol.  The tftp protocol is often used to boot diskless \
  5. #       workstations, download configuration files to network-aware printers, \
  6. #       and to start the installation process for some operating systems.
  7. service tftp
  8. {
  9. socket_type             = dgram
  10. protocol                = udp
  11. wait                    = yes
  12. user                    = root
  13. server                  = /usr/sbin/in.tftpd
  14. server_args             = -u nobody -s /tftpboot #指定目录
  15. disable                 = no  #将yes改为no
  16. per_source              = 11
  17. cps                     = 100 2
  18. flags                   = IPv4
  19. }
  20. ~
  21. ~
  22. ~
  23. ~
  24. "/etc/xinetd.d/tftp" 18L, 519C

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

  1. [root@localhost ~]# vi /etc/exports
  2. /mnt *(ro,sync)
  3. /tftpboot *(ro,sync)

6、复制pxelinux.0、initrd.img、vmlinuz、isolinux/*.msg

  1. mount /dev/cdrom /mnt
  2. cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
  3. cp /mnt/p_w_picpaths/pxeboot/{initrd.img,vmlinuz} /tftpboot/
  4. mkdir /tftpboot/pxelinux.cfg
  5. touch /tftpboot/pxelinux.cfg/default
  6. vi /tftpboot/pxelinux.cfg/default
  7. default linux
  8. prompt 1
  9. timeout 600
  10. display boot.msg
  11. F1 boot.msg
  12. F2 options.msg
  13. F3 general.msg
  14. F4 param.msg
  15. F5 rescue.msg
  16. label linux
  17. kernel vmlinuz
  18. #  append initrdinitrd=initrd.img
  19. append initrdinitrd=initrd.img   ks=nfs:192.168.11.5:/tftpboot/ks.cfg
  20. label text
  21. kernel vmlinuz
  22. append initrdinitrd=initrd.img text  以文本模式安装
  23. label ks
  24. kernel vmlinuz
  25. append ks initrdinitrd=initrd.img
  26. label local
  27. localboot 1
  28. label memtest86
  29. kernel memtest
  30. append -

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

7、使用kickstarter配置无人值守。

  1. [root@localhost tftpboot]# pwd
  2. /tftpboot
  3. [root@localhost tftpboot]# ls
  4. initrd.img  ks.cfg  pxelinux.0  pxelinux.cfg  vmlinuz
  5. [root@localhost tftpboot]# vi ks.cfg
  6. install
  7. nfs --server=192.168.11.5 --dir=/mnt
  8. lang en_US.UTF-8
  9. keyboard us
  10. network --device eth0 --bootproto dhcp --hostname localhost
  11. rootpw --iscrypted $1$kE50pGl1$imqt12NcqN6KiJGToKNZo0
  12. firewall --disable
  13. authconfig --enableshadow --enablemd5
  14. selinux --enforcing
  15. timezone Asia/Shanghai
  16. bootloader --location=mbr --driveorder=sda
  17. # The following is the partition information you requested
  18. # Note that any partitions you deleted are not expressed
  19. # here so unless you clear all partitions first, this is
  20. # not guaranteed to work
  21. clearpart --all --initlabel
  22. part /boot --fstype ext3 --size=100
  23. part swap --size=2048
  24. part / --fstype ext3 --size=1 --grow
  25. %packages
  26. @core
  27. @base
  28. device-mapper-multipath
  29. imake
  30. *******************************************************************************

8、启动服务

  1. service dhcpd start
  2. service xinetd start
  3. service portmap start
  4. service nfslock start
  5. service nfs start

9、被安装服务器上安装测试(选择pxe启动方式)

到这一步说明我们配置的dhcp服务器起作用了,我们直接回撤,系统开始查找系统文件自动安装

转载于:https://blog.51cto.com/xiaodong88/1128391

PXE+NFS+FTP+kickstarter无人值守安装linux系统相关推荐

  1. 无人值守安装 linux 系统

    项目内容:利用网络安装技术,结合 Kickstart 程序脚本,实现无人值守安装 Linux 操作系统 项目目的:通过此技术,批量的完成成百上千台服务器系统的无人看管安装,节省大量时间. 1.首先配置 ...

  2. 服务器推送系统安装,搭建PXE服务器,推送安装linux系统

    搭建环境: 推送服务器: Ip:192.168.189.138 系统:CentOS 5.8 推送系统:RHEL 5.4 1:配置dhcpd服务. 如果没有安装dhcpd服务,请安装: 1 2 3 4 ...

  3. 无人值守安装Linux系统

    无人值守安装系统

  4. (转)Cobbler无人值守批量安装Linux系统

    本文目录: 1.1 pxe安装系统 1.2 cobbler基本介绍 1.3 安装和配置cobbler 1.3.1 安装cobbler 1.3.2 配置dhcp和tftp 1.4 cobbler从本地光 ...

  5. 用Kickstart批量安装Linux系统、Kickstart安装,linux批量安装;Linux的Kickstart的 无人值守安装;linux pxe自动安装linux系统...

    用Kickstart批量安装Linux|Kickstart,批量安装:Linux的Kickstart的 无人值守安装:linux pxe自动安装linux系统: KickStart + DHCP + ...

  6. PXE大批量安装Linux系统

    大批量安装linux系统 方案:我们采用pxe方法安装 PXE简介 PXE(preboot execute environment)是由Intel公司开发的最新技术,可以实现无人值守linux系统自动 ...

  7. 无人值守网络安装Linux系统

    概述:本文描述的是通过网络安装linux系统(PXE),完全自动无人值守安装,是通过Linux系统的kickstart工具来实现的 实验环境:分为安装服务器,启动服务器和客户机,本文把安装服务器和启动 ...

  8. linux查看网卡硬件 lsw,无人值守网络安装Linux系统

    概述:本文描述的是通过网络安装linux系统(PXE),完全自动无人值守安装,是通过Linux系统的kickstart工具来实现的 实验环境:分为安装服务器,启动服务器和客户机,本文把安装服务器和启动 ...

  9. 3.1 KickStart 无人值守批量安装Linux系统

    原创地址找不到了,请原创来找我吧,感谢原创. KickStart 无人值守批量安装Linux系统 一:需求分析 不适合本地安装的情况如下: (1)无软驱和光驱:如果计算机不带光驱或软驱,则无法通过本地 ...

  10. 使用PXE+dhcpd+vsftpd+tftp+kickstart 实现无人值守安装linux

    如果你是一个机房管理员,需要给几十台上百台的PC安装linux ,你会怎么办呢? 是一个个拿着U盘.光盘去安装吗?这个工程量很大的! 现在我们现在用一种简单的方法利用PXE+dhcpd+vsftpd+ ...

最新文章

  1. 给互联网职场人五点吐血建议
  2. Linux内核版本 uname命令 GNU项目 Linux发行版
  3. golang 执行命令 设置超时
  4. Leetcode 168. Excel表列名称 解题思路及C++实现
  5. kafka 集群--3个broker 3个zookeeper创建实战
  6. 数据查询语言(DQL)
  7. Service Mesh 在中国工商银行的探索与实践
  8. cubemx 读卡器_cubeMX 之 SD卡读写
  9. php在html中生成option,php-如何为使用laravel表单生成器创建的select标签的选项指定HTML属性?...
  10. linux之权限管理_1
  11. VS Code的golang开发配置 之 代码提示
  12. 一款问答APP的产品需求文档(PRD)
  13. mysql convertgrp_Mysql中几种sql的常见用法
  14. android xml 预览,解决Android studio xml界面无法预览问题
  15. html点击按钮 重新加载页面或者跳转页面实现
  16. 【Windows C++笔记】winbase.h
  17. 在Windows上使用Git和GitHub
  18. 使用C++实现“生命游戏“
  19. centos7 aarch64 环境编译安装MP4Box
  20. 神经网络——torch.optim优化器的使用

热门文章

  1. python程序语言二级教程_计算机二级python学习教程(2) python语言基本语法元素...
  2. 关于matlab中数据拟合的一些函数polyfit()
  3. 【bug:鳄梨】【上线前修改其他bug急着提交造成的bug】
  4. linux edi esi eax 汇编指令,汇编指令lodsb和stosb、lodsd和stosd
  5. mysql5.7备份
  6. java ArrayList添加元素全部一样
  7. Linux入门——开机启动过程浅析
  8. selenium调用浏览器进行抓取页面
  9. MvvmCross框架在XamarinForms中的使用入门
  10. 记redis的一个测试