基於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:啓動圖形服務配置 自定義編輯