网络部署linux系统
时间:2010-04-13 来源:lonelysoul011
1 概述
本文主要介绍如何使用网络部署linux系统(以redhat5.3为例)。在环境实验测试中,安装操作系统是一项费时又费力的工作。有限的光驱与光盘限制了并行安装的可能性,使用网络安装很好地解决了并行安装的苦恼,在时间上至少节约了1/2。
2 在Windows2003上部署 linux网络安装服务
请先关闭Windows防火墙。
2.1 准备linux内核(redhat5.3)
1. 将redhat5.3光盘中isolinux文件夹中的*.msg文件复制到tftpd主目录 e:\soul\tftpboot中。
2. 在e:\soul\tftpboot 中建立pxelinux.cfg目录,将光盘isolinux文件夹中的isolinux.cfg文件复制到e:\soul\tftpboot\pxelinux.cfg中,并改名为default。
3. 在装好的redhat5.3中将/usr/lib/syslinux/pxelinux.0文件复制到e:\soul\tftpboot中。
4. 在e:\soul\tftpboot创建rhel32文件夹,将redhat5.3光盘中的所有文件拷贝到rhel32中。
5. 在e:\soul\tftpboot创建redhat32文件夹,复制redhat5.3光盘中isolinux文件夹中的*.msg文件,initrd.img, vmlinuz内核文件到redhat32。
2.2 准备Tftpd软件
http://tftpd32.jounin.net/tftpd32_download.html 下载Tftpd32.303,启动tftpd 配置DHCP项,填入ip池和boot文件。
2.3 安装和置FTP
1. 在服务器配置向导中选择应用程序服务器(IIS),选择下一步。
2. 主目录设置为e:\soul\tftpboot。
配置完成FTP能够正常访问,访问方法ftp://192.3.3.150/
2.4 创建ks文件
在已经安装好图形的redhat5.3中运行system-config-kickstart,需安装
system-config-kickstart.noarch软件包。
ks.cfg文件内容:
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Use text mode install
key --skip
# Firewall configuration
firewall --disabled
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# Installation logging level
logging --level=info
# Use network installation 安装源选择
url --url=ftp://192.3.3.150/rhel32
# Reboot after installation
reboot
#Root password
rootpw --iscrypted $1$K6D/nyHg$uQz8ZKt1uvyZc/BfblIzi/ 设置root密码为huawei
# SELinux configuration
selinux --disabled
# System timezone
timezone Asia/Shanghai
# Install OS instead of upgrade
install
# Disk partitioning information 磁盘分区单位MB
part /boot --bytes-per-inode=4096 --fstype="ext3" --size=100
part swap --bytes-per-inode=4096 --fstype="swap" --size=4000
part / --bytes-per-inode=4096 --fstype="ext3" --size=10000
%packages
@development-libs
@system-tools
@text-internet
@gnome-desktop
@dialup