远程安装fc9
1.
下载:
wget -c
wget -c
安装syslinux-tftpboot:
rpm -Uvh syslinux-tftpboot-3.35-1.i386.rpm # 如果在安装过程中提示缺少某个依赖的rpm包, 可以yum install 依赖包名来安装所依赖的rpm包, 或者在安装光盘里找到相应的rpm包
安装tftp-hpa:
tar zxvf tftp-hpa-0.48.tar.gz
cd tftp-hpa-0.48
./configure
make
make install
cp ./tftp-xinetd /etc/xinetd.d/ # 把tftp-xinetd文件拷贝到/etc/xinetd.d目录下, 让xinetd这个超级守护进程来管理tftpd的运行。
vi /etc/xinetd.d/tftp-xinetd # 把disable = yes 修改成 disable = no
service xinetd restart
2. 安装和配置dhcp服务
yum install dhcp
修改/etc/dhcpd.conf文件为:
###################################################### /etc/dhcpd.conf ######################################################
########### for PXE ##########################
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr code 7 = ip-address;
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
option vendor-class-identifier "PXEClient";
vendor-option-space PXE;
# At least one of the vendor-specific PXE options must be set in
# order for the client boot ROMs to realize that we are a PXE-compliant
# server. We set the MCAST IP address to 0.0.0.0 to tell the boot ROM
# that we can't provide multicast TFTP (address 0.0.0.0 means no
# address).
option PXE.mtftp-ip 0.0.0.0;
# This is the name of the file the boot ROMs should download.
filename "pxelinux.0";
# This is the name of the server they should get it from.
next-server 192.168.80.128;
}
############# for PXE ###########################
ddns-update-style interim;
ignore client-updates;
allow booting;
allow bootp;
################################
default-lease-time 1200;
max-lease-time 9200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.80.255;
option routers 192.168.80.2;
option domain-name-servers 202.96.128.166;
option domain-name "binaryzuo.org";
#################################
subnet 192.168.80.0 netmask 255.255.255.0 {
# --- default gateway
# option routers 192.168.80.2;
# option subnet-mask 255.255.255.0;
# option nis-domain "binaryzuo.org";
# option domain-name "binaryzuo.org";
# option domain-name-servers 202.96.128.166;
# option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.80.100 192.168.80.200;
# default-lease-time 21600;
# max-lease-time 43200;
# we want the nameserver to appear at a fixed address
host ns {
# next-server marvin.redhat.com;
hardware ethernet 00:0C:29:08:04:43;
fixed-address 130.51.0.176;
}
}
###################################################### /etc/dhcpd.conf ######################################################
3. 配置tftpboot
cp -f /usr/lib/syslinux/pxelinux.0 /tftpboot
mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom/
cp images/pxeboot/
cp -f vmlinuz initrd.img /tftpboot
cd ../../isolinux
cp isolinux.cfg /tftpboot/default
cp *.msg /tftpboot/
阅读(1152) | 评论(0) | 转发(0) |