快速业务通道

1009 通过网络无人值守安装 Linux

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-30
通过网络无人值守安装 Linux Boot Server (dhcp,tftp) Installation Server (nfs) ------------------------------------------------------------------------------------------------------
mount -t cifs //192.168.50.8/ISOS /mnt -o username=''user'',passwd=''123''
mkdir -p /data/rhel5u2
cp /mnt/CentOS-5.2-i386-bin-DVD.iso /data/rhel5u2/ yum install -y dhcp tftp-server nfs-utils
yum install -y syslinux
cp /usr/lib/syslinux/pxelinux.0 /tftpboot/ ------------------------------------------------------------------------------------------------------
dhcp配置:
vim /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
filename "pxelinux.0";
subnet 172.16.0.0 netmask 255.255.0.0 {
option domain-name "domain.org";
option domain-name-servers 172.16.0.1;
range dynamic-bootp 172.16.0.128 172.16.0.254;
default-lease-time 21600;
max-lease-time 43200;
}
service httpd start ------------------------------------------------------------------------------------------------------
tftp配置:
vim /etc/xinetd.d/tftp
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 = IPv4
}
service xinetd start mount -t iso9660 -o loop,ro /data/rhel5u2/CentOS-5.2-i386-bin-DVD.iso /mnt
cp /mnt/isolinux/initrd.img /tftpboot/initrd-rhel5u2-i386.img
cp /mnt/isolinux/vmlinuz /tftpboot/vmlinuz-rhel5u2-i386
Empire CMS,phome.net
mkdir /tftpboot/pxelinux.cfg
cp /mnt/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
vim /tftpboot/pxelinux.cfg/default
default rhel5u2-i386
prompt 1
timeout 10
display pxelinux.cfg/list
label rhel5u2-i386
kernel vmlinuz-rhel5u2-i386
append ks=nfs:172.16.0.1:/data/rhel5u2/ks.cfg initrd=initrd-rhel5u2-i386.img text
label vmlinuz-rhel5-x86_64
kernel vmlinuz-rhel5-x86_64
append initrd=initrd-rhel5-x86_64.img text vim /tftpboot/pxelinux.cfg/list
Choose one of the following Linux distributions for your installation:
Name Distribution Arch. Installation media
-------------------------------------------------------------------------
rhel5u2-i386 RHEL 5 AS U2 i386 192.168.138.1:/data/rhel5u2
rhel5-x86_64 RHEL 5 AS x86_64 192.168.138.1:/data/rhel5 ------------------------------------------------------------------------------------------------------
nfs配置:
vim /etc/exports
/data 172.16.0.0/24(ro,no_root_squash,sync)
service portmap start
service nfs start
showmount -e localhost ------------------------------------------------------------------------------------------------------
kickstart配置:
cp /root/anaconda-ks.cfg /data/rhel5u2/ks.cfg
vim /data/rhel5u2/ks.cfg
install
nfs --server=172.16.0.1 --dir=/data/rhel5u2
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto dhcp
rootpw --iscry

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号