基于NFS服务的无人值守安装 1:配置本地的安装源 挂载光驱:#mount rhel-5.4-server-i386-dvd.iso /mnt/ -o loop 复制文件:#cp -r /mnt/* /yum --yum是个目录 将yum目录共享:#vim /etc/exports /yum *(ro) --添加这句 2:配置tftp服务 打开配置文件:#vim /etc/xinetd.d/tftp 将里面的两句改为:server_args = -t -s -v /tftpboot disable = no 3:配置pxe启动文件 安装syslinux :rpm -ivh syslinux* 复制文件:cp /usr/lib/syslinux/pxelinux.0 /tftpboot/ cp /yum/isolinux/* /tftpboot 建立目录:mkdir /tftpboot/pxelinux.cfg cp /yum/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default 修改配置:vim /tftpboot/pxeliunx.cfg/default 在最后面添加三行:lable linuxli kernel vmlinuz append initrd=initrd.img ks=nfs:192.168.1.1:/yum/ks/ks.cfg 192.168.1.1是安装服务的ip地址, 建立目录:mkdir /yum/ks 4:搭建dhcp服务 安装软件包:rpm -ivh dhcp*
复制文件:cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
[root@li ~]# vim /etc/dhcpd.conf --vim修改配置文件
ddns-update-style interim;
ignore client-updates;
--下面这四行是手动加的
next-server 192.168.116.1; --指定tftp服务IP
filename "/tftpboot/pxelinux.0"; --指定pxe文件
allow bootp;
allow booting;
subnet 192.168.116.0 netmask 255.255.255.0 { --网段改为自己分配的网段
# --- default gateway
option routers 192.168.116.1; --客户端通过dhcp获取的网关
option subnet-mask 255.255.255.0;
option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 192.168.116.1; --客户端通过dhcp获取的dns的指向
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.116.2 192.168.116.254; --分配的IP段改为自己的网段内
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 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
};
5:启动图形服务配置 自定义编辑