网络安装详细步骤(有图解).docx_第1页
网络安装详细步骤(有图解).docx_第2页
网络安装详细步骤(有图解).docx_第3页
网络安装详细步骤(有图解).docx_第4页
网络安装详细步骤(有图解).docx_第5页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

REDHAT6.0 网络安装说明书目录 【实现网络安装的ip:0】1 前言 21.1 说明 22 安装方法 22.1 准备工作 22.2 配置tftp服务器 22.3 配置DHCP服务器 32.4 配置NFS目录 42.5 配置default文件 52.6 配置ks.cfg文件 53 启动 71 前言1.1 说明本文档描述了RedHat6.0的网络安装方法。网络安装的前提是所有机器必须支持PXE协议,也就是在BIOS中能够将机器设置为从 “网络启动”。同时必须有一台安装服务器。2 安装方法2.1 准备工作1:将安装客户端的所有机器设置成网络启动,并抄录它们的MAC地址。2:安装服务器的操作系统已安装成功,并建议采用满安装的安装模式。3:安装还需要一个RedHat6.0的ISO文件或其它需要安装的操作系统的ISO。2.2 配置tftp服务器1:安装tftp服务,将安装光盘mount到/mnt/cdrom下(mount /dev/cdrom1 /mnt/cdrom/)这里的cdrom是根据实际情况 可以查询看find /dev/ -name “cdrom*” 看下cdrom具体什么名称,挂载好之后查询有没有安装DHPC 键入 rpm qa | grep dhcp,然后安装下面三个软件:# rpm -ivh xinetd-2.3.14-29.el6.x86_64.rpmrootlocalhost Packages# find * -name tftp* #rpm ivh tftp-0.49-5.1.el6.x86_64.rpm#rpm ivh tftp-server-0.49-5.1.el6.x86_64.rpm2:修改tftp的配置文件rootlocalhost # vi /etc/xinetd.d/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 = no (修改) per_source = 11 cps = 100 2 flags = IPv43:重启tftp服务rootlocalhost # /etc/init.d/xinetd restart4:将pxelinux.0, vmlinuz和initrd.img拷贝到tftp指定的/tftpboot目录下/mnt/images/pxeboot/initrd.img/mnt/isolinux/initrd.img要想找到pxelinux.0必须先安装syslinux #find / -name “syslinux*”rootlocalhost Packages# find * -name syslinux-3.86-1.1.el6.x86_64.rpmRpm安装有依耐性 需要先安装Crypt:PasswdMD5 和Digest:SHA1这两个东西。#find /mnt/Packages -name “*PasswdMD5*”#find /mnt/Packages -name “* SHA1*”找到后安装好再安装syslinux现在就已经安装好了syslinux,也已经生成了pxelinux.0rootlocalhost Packages# find / -name pxelinux.0/usr/share/syslinux/pxelinux.0 【移动到】/tftpboot目录下如果没有/tftpboot目录,先创建。pxelinux.0文件中定义的是请求linux内核,根文件系统之类的参数,这个文件随本文档附带,如果安装服务器安装了syslinux,也可以在/usr/lib/syslinux/pxelinux.0下找到。vmlinuz是可引导的、压缩的内核。它存在于安装光盘的isolinux目录下,将其拷贝至/tftpboot目录下即可。initrd.img是内核引导文件,和vmlinuz文件存在于相同的目录下,也将其拷贝至/tftpboot目录下即可。2.3 配置DHCP服务器DHCP服务用于给指定机器分配指定IP,分配IP的方式参照配置文件中host ns的写法。【所有安装的rpm文件大部分都在/mnt/Packages/下面】rootlocalhost Packages# rpm -ivh dhclient-4.1.1-12.P1.el6.x86_64.rpmrootlocalhost Packages# rpm -ivh dhcp-4.1.1-12.P1.el6.x86_64.rpmrootlocalhost etc# cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/rootlocalhost etc# vim /etc/dhcp/dhcpd.confddns-update-style interim;ignore client-updates;allow booting;allow bootp;subnet netmask option routers ;option subnet-mask ;option time-offset 18000; # Eastern Standard Timerange dynamic-bootp 0 9;default-lease-time 21600;max-lease-time 43200;next-server 0; #自己的IPfilenamepxelinux.0;rootlocalhost # /etc/init.d/dhcpd configtestSyntax: OKrootlocalhost # /etc/init.d/dhcpd restart rootlocalhost # yum install tftp xinetd tftp-serverrootlocalhost # vi /etc/xinetd.d/tftpservice 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关闭selinuxrootlocalhost mnt# vi /etc/sysconfig/selinuxSELINUX=disabledrootlocalhost mnt#reboot启动TFTProotlocalhost #/etc/init.d/xinetd restart配置安装服务器1、 准备ISO安装介质。将Red Hat Linux安装介质的ISO文件都放置到/mnt/sio目录下。注意不要改变文件名。 2、 编辑NFS服务器配置文件rootlocalhost # vi /etc/exports/mnt/iso *(ro)/var/lib/tftpboot/kickstart/ *(ro,sync)3、重启NFS以生效rootlocalhost #service nfs restart 4、监测目录/mnt/iso 是否已经被正确共享rootlocalhost # showmount -e localhost这样,就已经设置好了一个安装服务器。安装kickstart与配置1) 创建配置文件2) 部署kickstart配置文件,即将kickstart配置文件放置到安装服务器上,并在安装程序的kernel参数中指定kickstart配置文件的位置。1)下面安装system-config-kickstart,Kickstart的配置工具的安装步骤:由于kickstart关联的包比较多,手动安装比较麻烦。这个时候我们直接使用Redhat的安装卸载功能进行安装。运行:System-Administartion-Add/Remove Software。然后在打开的界面输入关键字查找kickstart的安装包,并且在查找结果选择A graphical interface for making kickstart files 安装包进行安装,如图:选择第二个,点Apply-上图可定义安装环境、分区、用户信息、ip等如上在主目录会生成一个安装配置文件:ks.cfg,然后将此文件cp到/iso中,便可引导安装!生成的ks.cfg文件保存在/home/kickstart/目录下,rootlocalhost iso#cp /home/kickstart/ks.cfg /mnt/iso/rootlocalhost iso# vi /mnt/iso/ks.cfgrootlocalhost iso# vi /mnt/iso/ks.cfg #platform=x86, AMD64, or Intel EM64T#version=DEVEL# Firewall configuration# Clear the Master Boot Recordbootloader -location=mbr -md5pass=$1$bCmKIwQa$uY84lA9kQmbVSskvw3q2N1firewall -disabled# Install OS instead of upgradeinstall# Use NFS installation mediachinese-supportnfs -server=0 -dir=/mnt/iso# Root passwordrootpw -iscrypted $1$5hryqDaz$A.rKXPqG1MrxBUbVOI2gZ0# Network informationnetwork -bootproto=dhcp -device=eth0 -onboot=on# System authorization informationauth -useshadow -passalgo=md5# Use text mode installtextfirstboot -disable# System keyboardkeyboard us# System languagelang en_US# SELinux configurationselinux -disabled#DO not configure the X Windows Systemskipx# Installation logging levellogging -level=info#Reboot after installationreboot# System timezonetimezone -isUtc Asia/Shanghai# System bootloader configurationbootloader -location=mbr -md5pass=$1$bCmKIwQa$uY84lA9kQmbVSskvw3q2N1# Partition clearing informationclearpart -all%packageschinese-supportfontsnfs-file-serversystem-admin-tools%end以上#开头的全部是注释。文件中的nfs server=0 dir=/mnt/iso选项告诉安装程序到服务器0的NFS共享目录下寻找安装介质。Red Hat Linux安装程序足够聪明,可以识别该目录下应该被读取的ISO光盘镜像文件名,所有这里你不需要指定ISO文件名。2) 部署kickstart配置文件首先我们需要把kickstart配置文件放在安装服务器上。我们把它放到/var/lib/tftpboot/kickstart/目录下。即该文件的NFS访问路径为:nfs:01:/var/lib/tftpboot/kickstart/ks.cfgrootlocalhost iso#cat /etc/exports/mnt/iso *(ro)/var/lib/tftpboot/kickstart/ *(ro,sync)其次,我们需要让安装程序知道我们希望它用kickstart方式安装,并告知它可以从哪里获得kickstart配置文件。这可以通过给内核添加一个参数“ks=kickstart配置文件路径”来实现。我们只需对启动服务器上的/tftpboot/pxelinux.cfg/default文件做一些小修改就可以做到这点:rootlocalhost iso#cat /var/lib/tftpboot/pxelinux.cfg/defaultdefault linuxlabel linuxkernel vmlinuzappend initrd=initrd.imgks=nfs:0:/var/tftpboot/kickstart/ks.cfg这样在启动安装程序的时候,参数ks= nfs:

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论