PXE+DHCP+TFTP+NFS+Kickstart網路自動安裝配置簡化版
DHCP,NFS,TFTP使用同一臺伺服器,IP為172.25.1.114
一、配置DHCP服務
安裝dhpc
vi /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
allow booting;
allow bootp;
class "pxeclients"{
match if substring(option vendor-class-identifier,0,9) = "PXEClient";
filename "redhat5x86/pxelinux.0";
next-server 172.25.1.114;
}
subnet 172.25.0.0 netmask 255.255.0.0 {
option routers 172.25.0.254;
option subnet-mask 255.255.0.0;
# option nis-domain "";
# option domain-name "";
# option domain-name-servers 202.96.134.133;
option time-offset -18000; # Eastern Standard Time
range dynamic-bootp 172.25.1.130 172.25.1.140;
default-lease-time 21600;
max-lease-time 43200;
host linux {
hardware ethernet 00:1E:C9:3A:37:48;
fixed-address 172.25.1.130;
}
host linux2 {
hardware ethernet 00:1E:C9:3A:34:E8;
fixed-address 172.25.1.131;
}
}
======================================================================
二、配置TFTP
安裝
chkconfig tftp on
service xinetd restart
====================================================================
三、啟動檔案配置
[root@localhost tftpboot]# mkdir redhat5x86
[root@localhost tftpboot]# mount -o loop /root/redhat5.x64.iso /mnt
[root@localhost tftpboot]# cp /usr/lib/syslinux/pxelinux.0 /tftpboot/redhat5x86/
[root@localhost tftpboot]# mkdir /tftpboot/redhat5x86/pxelinux.cfg
[root@localhost tftpboot]# cp /mnt/isolinux/isolinux.cfg /tftpboot/redhat5x86/pxelinux.cfg/default
[root@localhost tftpboot]# cp /mnt/images/pxeboot/initrd.img /tftpboot/redhat5x86/
[root@localhost tftpboot]# cp /mnt/images/pxeboot/vmlinuz /tftpboot/redhat5x86/
[root@localhost tftpboot]#
default的預設資訊為:
[root@localhost tftpboot]# cat /tftpboot/redhat5x86/pxelinux.cfg/default
default linux
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
kernel vmlinuz
append initrd=initrd.img
label text
kernel vmlinuz
append initrd=initrd.img text
label ks
kernel vmlinuz
append ks initrd=initrd.img
label local
localboot 1
label memtest86
kernel memtest
append -
[root@localhost tftpboot]#
修改為:
default local
prompt 1
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label local
localboot 0
label linux install
kernel vmlinuz
append initrd=initrd.img
label linux text
kernel vmlinuz
append initrd=initrd.img text
label linux ks
kernel vmlinuz
append ks initrd=initrd.img
label linux memtest86
kernel memtest
append -
label linux autoinstall
kernel vmlinuz
append ks= initrd=initrd.img devfs=nomount ramdisk_size=16384 nofb
[root@localhost redhat5x86]# cp /mnt/isolinux/*.msg /tftpboot/redhat5x86/
[root@localhost redhat5x86]# cat /tftpboot/redhat5x86/boot.msg
splash.lss
- To install or upgrade in graphical mode, press the 01
- To install or upgrade in text mode, type: 01linux text
- Use the function keys listed below for more information.
0f[F1-Main] [F2-Options] [F3-General] [F4-Kernel] [F5-Rescue]07
[root@localhost redhat5x86]#
修改boot.msg檔案為:
^L
^Xsplash.lss
- To boot Operation System locally, press the ^O01
- To install or upgrade in graphical mode, type: ^O01linux
- To install or upgrade in text mode, type: ^O01linux text
- To auto install or upgrade, type: ^O01linux autoinstall
- Use the function keys listed below for more information.
^O0f[F1-Main] [F2-Options] [F3-General] [F4-Kernel] [F5-Rescue]^O07
===============================================================
四、配置NFS服務
[root@localhost redhat5x86]# cat /etc/exports
/export *(ro,sync)
/export/ks *(rw,sync)
[root@localhost redhat5x86]#
[root@localhost /]# mkdir /export
[root@localhost /]# mkdir /export/ks
[root@localhost /]# mv /root/*.iso /export/
[root@localhost /]# cp /root/anaconda-ks.cfg /export/ks/ks.cfg
[root@localhost /]# chmod 644 /export/ks/ks.cfg
[root@localhost /]#
===============================================================
五、重啟服務
service dhcpd restart
service xinetd restart
service nfs restart
===============================================================
六、裝置客戶端
客戶端設定PXE啟動啟動後輸入linux autoinstall
問題:
輸入linux autoinstall一直不能執行,
輸入:
linux ks= 可以執行.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/312079/viewspace-245856/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 網路全自動安裝ubuntu server薦UbuntuServer
- 自動化簡化了移動傳輸網路的部署
- 網路管理自動化
- 最小化安裝centos7下配置網路CentOS
- 分享 jdk ant 綠色安裝及自動化配置 for windowsJDKWindows
- MySQL的簡單安裝配置(免安裝zip版,版本5.7.21)MySql
- CentOS7 安裝 配置網路CentOS
- mydumper自動化安裝指令碼指令碼
- 使用NIM Server網路半自動安裝AIX系統ServerAI
- PXE 基於網路自動安裝CentOS 6/7/8CentOS
- 【松溪】部署Linux系統的網路自動安裝Linux
- 免安裝版MySQL的優化與配置MySql優化
- 完全移動版MySQL(MySQL免安裝版的配置)MySql
- 客戶端自動配置安裝(expect工具)客戶端
- Jenkins 自動化安裝外掛Jenkins
- 資料模型與網路自動化模型
- SAP ECC 6.0 安裝之後的配置(轉自網路,審慎參考)
- 通過 PXE 自動化安裝 Ubuntu ServerUbuntuServer
- 無人值守自動化安裝系統
- PXE實現系統自動化安裝
- 自動化安裝zabbix指令碼(3.0/3.2)指令碼
- Hadoop自動化安裝shell指令碼Hadoop指令碼
- MySQL自動化運維之安裝篇MySql運維
- MySQL免安裝版配置MySql
- MySQL 免安裝版配置MySql
- Centos下Oracle11gR2安裝教程與自動化配置指令碼CentOSOracle指令碼
- MySQL安裝之二_安裝配置泥潭版MySql
- webpack(簡單安裝配置)Web
- yum安裝簡潔版
- 配置ks.cfg實現自動安裝過程
- 利用進化方法自動生成神經網路:深度進化網路DENSER神經網路
- 常用網路介面自動化測試框架框架
- win10怎麼聯網自動安裝硬體驅動_win10聯網自動安裝硬體驅動教程Win10
- jenkins的安裝和配置(flask結合jenkins半自動化部署流程)JenkinsFlask
- 分享MySQL的自動化安裝部署的方法MySql
- MySQL安裝之一_安裝配置順利版MySql
- mysql 非安裝版的配置MySql
- MySql綠色版安裝配置MySql