作者:diege

时间:2012-05-02

第三次整理

一:准备工作

1:安装centos系统,配置好网络

二:安装各软件

1:配置yum

2:安装kickstart

# yum -y install system-config-kickstart.noarch

3:安装配置nfs

#yum -y install nfs-utils

# vim /etc/exports

/misc/cd 192.168.1.0/24(rw,no_root_squash)

/kickstart 192.168.1.0/24(rw,no_root_squash)

# exportfs -av

4:安装配置dhcp

# yum –y install dhcp

#cp /usr/share/doc/dhcp*/dhcpd.conf.sample  /etc/dhcpd.conf

#vim  /etc/dhcpd.conf

ddns-update-style interim;

ignore client-updates;

allow booting;

allow bootp;

subnet 192.168.1.0 netmask 255.255.255.0 {

option routers                  192.168.1.1;

option subnet-mask              255.255.255.0;

option domain-name              "domain.org";

option domain-name-servers      192.168.1.1;

option time-offset              -18000; # Eastern Standard Time

range dynamic-bootp 192.168.1.150 192.168.1.199;

default-lease-time 21600;

max-lease-time 43200;

next-server 192.168.1.100; #TFTPServer的IP

filename "/pxelinux.0";  #pxelinux loader文件位置

}

#chkconfig dhcpd on

#etc/init.d/dhcpd start

5:安装TFTP

# yum  -y install tftp-server.i386

启动tftp服务

# chkconfig xinetd on

#/etc/init.d/xinetd start

#chkconfig  tftp on

# chkconfig --list|grep tftp

tftp:           on

三:配置

1:生存kickstart配置文件

在x-downs

# system-config-kickstart

配置

# mkdir /kickstart

# mv ks.cfg /kickstart/ks.cfg

# vim /kickstart/ks.cfg

install

# Installation logging level

logging --level=info

# Use NFS installation media

nfs --server=192.168.1.100 --dir=/misc/cd

lang en_US.UTF-8

keyboard us

#xconfig  --defaultdesktop=GNOME --depth=8 --resolution=640x480

xconfig --startxonboot

#network --device eth0 --bootproto dhcp --hostname centosa.localdomain

network --device eth1 --bootproto static --ip 192.168.1.140 --netmask 255.255.255.0 --hostname centosc.localdomain

#network --bootproto=dhcp --device=eth1 --onboot=on

rootpw --iscrypted $1$SVp5Dkda$/OPOyjn4hYyKk68IW08Y1.

firewall --enabled --port=22:tcp

authconfig --enableshadow --enablemd5

selinux --enforcing

timezone --utc Asia/Shanghai

bootloader --location=mbr

# The following is the partition information you requested

# Note that any partitions you deleted are not expressed

# here so unless you clear all partitions first, this is

# not guaranteed to work

clearpart --none

part /boot --fstype ext3 --size=100 --ondisk=sda

part pv.2 --size=0 --grow --ondisk=sda

volgroup VolGroup00 --pesize=32768 pv.2

logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow

logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=512 --grow --maxsize=1024

%packages

@admin-tools

@base

@core

@development-libs

@development-tools

@dialup

@editors

@gnome-desktop

@games

@graphical-internet

@graphics

@office

@printing

@sound-and-video

@system-tools

@text-internet

@base-x

keyutils

kexec-tools

iscsi-initiator-utils

trousers

fipscheck

device-mapper-multipath

python-imaging

imake

java-1.6.0-openjdk

libsane-hpaio

festival

audit

xorg-x11-server-Xnest

xorg-x11-server-Xvfb

%post

#setup yumn repository

YUM_REPOS_FILE=/etc/yum.repos.d/centos.repo

for d in Cluster ClusterStorage Server VT ;do

cat<<EOF>>${YUM_REPOS_FILE}

[diege-${d}]

Name=diege ${d}

baseurl=http://192.168.1.100/download/networkyum/

enabled=1

gpgcheck=0

EOF

Done

2:配置启动介质

# cp /misc/cd/p_w_picpaths/pxeboot/vmlinuz /tftpboot/

# cp /misc/cd/p_w_picpaths/pxeboot/initrd.img /tftpboot/

find / -name pxelinux.0

/usr/lib/syslinux/pxelinux.0

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

# mkdir /tftpboot/pxelinux.cfg

# cp /misc/cd/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default

#vim /tftpboot/pxelinux.cfg/default

default autoinstall

prompt 1

timeout 10

display boot.msg

F1 boot.msg

F2 options.msg

F3 general.msg

F4 param.msg

F5 rescue.msg

label linux

  kernel vmlinuz

  append initrd=initrd.img

label text

  kernel vmlinuz

  append initrd=initrd.img text

label ks

  kernel vmlinuz

  append ks initrd=initrd.img

label local

  localboot 1

label memtest86

  kernel memtest

  append –

label autoinstall

  kernel vmlinuz

  append ks=nfs:192.168.1.100:/kickstart/ks.cfg initrd=initrd.img devfs=nomount ramdisk_size=9216 nofb

四、Client安装CentOS

Client从网卡启动,默认30秒未做选择 自动安装

转载于:https://blog.51cto.com/ipseek/851051

Kickstart+NFS+DHCP+TFTP+PXElinux实现CentOS的网络自动安装相关推荐

  1. linux pxe启动ftp格式,FTP+DHCP+TFTP+PXElinux实现RHLINUX的网络自动安装

    (一)原理 第一步:PXE Client向DHCP发送请求 首先,将支持PXE的网络接口卡(NIC)的客户端的BIOS设置成为网络启动,通过PXE BootROM(自启动芯片)会以UDP(简单用户数据 ...

  2. Kickstart+HTTP+DHCP+TFTP全自动批量安装部署Linux系统

    说明: Kickstart服务器系统:CentOS 6.5 64位 IP地址:192.168.0.250 需要安装部署的Linux系统:CentOS 6.5 64位 eth0(第一块网卡,用于外网)I ...

  3. 自建DHCP TFTP服务 用PXE启动实现无人值守安装Centos6

    下面是自己制作的PXE安装Centos6的环境已经配置脚本 #!/bin/bash ########################################################## ...

  4. CentOS/Ubuntu制作自动安装arm iso镜像

    一.目的 减少操作系统安装过程中人机交互过程,实现选择光盘安装后,无需其他人机交互过程即可自动完成操作系统的安装. 二.环境和软件工具 环境:Linux Ubuntu/CentOS操作系统(其他发行版 ...

  5. CentOS/Ubuntu制作自动安装iso实操

    一.目的 减少操作系统安装过程中人机交互过程,实现选择光盘安装后,无需其他人机交互过程即可自动完成操作系统的安装. 二.环境和软件工具 环境:Linux Ubuntu/CentOS操作系统(其他发行版 ...

  6. linux6.5虛擬機镜像,CentOS 7.2 自动安装光盘实验全过程记录

    实验过程: 本文在一台RHEL6.5机器上,通过向原生CentOS7.2 iso中添加kickstart启动脚本ks.cfg和读取脚本的开机选项,再对该iso镜像重新封装的方式,完成CentOS7.2 ...

  7. Kickstart +ftp+dhcp+tftp实现Linux系统的无人值守安装

    基本原理及概念: 一.配服务器的IP地址: 二.yum 的配置如下: 1.[root@localhost ~]# mount /dev/cdrom /mnt/cdrom 2.[root@localho ...

  8. 制作CentOS 5.9自动安装光盘iso镜像

    准备环境:先手动安装一台centos5.9系统 [root@localhost ~]# mkdir /iso [root@localhost ~]# mount -o loop /dev/cdrom ...

  9. virtualbox虚拟机上安装centOS的网络配置(安装centos时选择桥接网络)

    最近接触hadoop,需要在在Linux上面开发,所以我装了一个virtualbox虚拟机,在该虚拟机上面安装了一个centOS系统.linux系统是装好了,但是网络配置却另人头疼.我主要是想让宿主机 ...

最新文章

  1. mysql bin.000013_mysql的binlog安全删除的一种方法
  2. 介绍三种将二进制字节字符转换为ASCII方法
  3. 决策树 - 鸢尾花数据集
  4. R7-1 新世界 (5 分)
  5. 被App Store拒绝的N个原因
  6. java测试驱动开发(TDD)之《井字游戏》
  7. 让HTML标签title属性值换行
  8. Android倒计时器——CountDownTimer
  9. linux远程摄像头,通过Web远程浏览Mini6410上的摄像头
  10. Android12前台服务问题
  11. 2024考研《艺术学概论》彭吉象|复习笔记(上篇)(1-6章)
  12. 灵 源 大 道 歌 · 曹 文 逸
  13. STM32CubeIDE+FREERTOS踩坑记录
  14. layui模块显示收缩_修改layui的后台模板的左侧导航栏可以伸缩的方法
  15. 查看本机MAC地址的方法
  16. 4735: C语言循环水题2
  17. 这样的团建,真羡慕skr人~
  18. 视觉-惯性SLAM入门与实践教程(基于VINS-Fusion)
  19. 【前端之旅】Web前端发展简史
  20. 如何在ubuntu14.04上安装轻量级的Budgie桌面(v8)

热门文章

  1. 批量导入数据到mssql数据库的
  2. VB.NET 开发ColorPicker例子
  3. 笔记本键盘维修[原创]
  4. 五一重装WinXP操作系统所遇问题的解决
  5. 滴眼液的ph值与胶原纤维的粘结性(还没写完)
  6. Python计算防蓝光眼镜加权阻隔率
  7. kafka的消费隔离级别(持续更新中)
  8. linux下面破解rar压缩包密码
  9. django中的form.is_valid()总是返回False
  10. python3的flask出现UnicodeDecodeError UnicodeDecodeError