加入收藏 | 设为首页 | 会员中心 | 我要投稿 佛山站长网 (https://www.0757zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Centos 5.5 X86_64实战KickStart自动化安装

发布时间:2016-11-01 02:36:10 所属栏目:Linux 来源:网络整理
导读:原理和概念: 1.1 什么是PXE 严格来说,PXE 并不是一种安装方式,而是一种引导的方式。进行 PXE 安装的必要条件是要安装的计算机中包含一个 PXE 支持的网卡(NI

现在开始部署:

1.  插入光盘,挂载光驱:

[root@DZ-03 ~]# mount /dev/cdrom /mnt/

mount: block device /dev/cdrom is write-protected, mounting read-only

[root@DZ-03 ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda3              13G  2.8G  9.4G  23% /

/dev/sda1             1.9G   41M  1.8G   3% /boot

tmpfs                 125M     0  125M   0% /dev/shm

/dev/hdc              3.9G  3.9G     0 100% /media/CentOS_5.5_Final

/dev/hdc              3.9G  3.9G     0 100% /mnt

2.  安装tftp服务器

[root@DZ-03 ~]# yum -y install tftp* tftp-server

[root@DZ-03 ~]# vim /etc/xinetd.d/tftp                                #更改tftp配置文件,打开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             = -s /tftpboot

disable                 = yes                    #把yes改成no,然后保存退出即可。

per_source              = 11

cps                     = 100 2

flags                   = IPv4

}

[root@DZ-03 ~]# /etc/init.d/xinetd restart   #启动tftp服务,因为tftp是xinetd服务的子进程受xinetd的管辖。

Stopping xinetd:                                           [FAILED]

Starting xinetd:                                           [  OK  ]

3.  设置pex配置文件

[root@DZ-03 ~]# cp /usr/lib/syslinux/pxelinux.0 /tftpboot/    #复制pex引导安装主程序。

[root@DZ-03 ~]# cp /mnt/images/pxeboot/initrd.img /tftpboot/  #复制initrd.img---ramdisk文件,帮助内核可选加载硬件驱动模块。

[root@DZ-03 ~]# cp /mnt/images/pxeboot/vmlinuz /tftpboot/     #复制vmlinuz内核文件。

[root@DZ-03 ~]# cp /mnt/isolinux/*.msg /tftpboot/             #复制linux开机引导文件。

[root@DZ-03 ~]# cp /mnt/isolinux/splash.lss /tftpboot/        #复制安装系统背景图标。

[root@DZ-03 ~]# mkdir /tftpboot/pxelinux.cfg                  #创建引导菜单的的目录。

[root@DZ-03 ~]# cp /mnt/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default    #default-引导菜单,可在tftp目录下建立不同vmlinuz和initrd.img的目录组合,从而建立不同系统引导的条件。

(编辑:佛山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读