詳解Rocky Linux 9.2 PXE 服務(wù)器
1 主要內(nèi)容
借助 PXE,實現(xiàn)操作系統(tǒng)的無人值守安裝。通過預(yù)先定義好的配置文件,可以自動化整個安裝過程。
2 基礎(chǔ)配置
事前的準(zhǔn)備。
2.1 關(guān)閉防火墻和 SELinux
systemctl disable --now firewalld sed -i 's/^SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config
2.2 配置網(wǎng)絡(luò)

2.3 安裝所需軟件
yum clean all && yum makecache yum install vsftpd tftp-server dhcp-server syslinux -y
2.4 準(zhǔn)備安裝文件
mkdir /var/ftp/pub/{rocky,iso}
mount /dev/cdrom /var/ftp/pub/iso
cp -r /var/ftp/pub/iso /var/ftp/pub/rocky2.5 準(zhǔn)備應(yīng)答文件
/var/ftp/pub/rocky/start.cfg
lang zh_CN keyboard --xlayouts='us' timezone Asia/Shanghai --utc rootpw $2b$10$l/D1kEbmrNhd0Chzv2RUROHtIo8TgfMZl.qUD2NUbAG5dlq/JCGeS --iscrypted reboot url --url=ftp://192.168.73.1/pub/rocky bootloader --append="rhgb quiet crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M" zerombr clearpart --all --initlabel autopart network --bootproto=dhcp firstboot --disable selinux --disabled %packages @^graphical-server-environment @development %end
3 FTP 配置
提供安裝操作系統(tǒng)所需的文件。
3.1 允許匿名訪問
sed -i 's/^anonymous_enable=.*$/anonymous_enable=YES/' /etc/vsftpd/vsftpd.conf
3.2 重啟服務(wù)并配置開機自啟
systemctl restart vsftpd systemctl enable vsftpd
4 DHCP 配置
分配 IP 地址。
cp /usr/share/doc/dhcp-server/dhcpd.conf.example /etc/dhcp/dhcpd.conf
subnet 192.168.73.0 netmask 255.255.255.0 {
range 192.168.73.100 192.168.73.200;
option routers 192.168.73.254;
option broadcast-address 192.168.73.255;
next-server 192.168.73.1;
filename "pxelinux.0";
default-lease-time 600;
max-lease-time 7200;
}5 TFTP 配置
能夠讓計算機在啟動時通過網(wǎng)絡(luò)加載必要的啟動文件。
5.1 準(zhǔn)備啟動文件
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ cp -r /var/ftp/pub/iso/isolinux/* /var/lib/tftpboot/ mkdir /var/lib/tftpboot/pxelinux.cfg cp /var/lib/tftpboot/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
5.2 配置引導(dǎo)項
default linux timeout 0 ... 省略 ... label linux menu label ^Install Rocky Linux 9.4 kernel vmlinuz append initrd=initrd.img inst.stage2=ftp://192.168.73.1/pub/rocky inst.ks=ftp://192.168.73.1/pub/rocky/start.cfg quiet menu end
5.3 重啟服務(wù)并配置開機自啟
systemctl restart tftp systemctl enable tftp
到此這篇關(guān)于Rocky Linux 9.2 PXE 服務(wù)器的文章就介紹到這了,更多相關(guān)Rocky Linux 9.2 PXE 服務(wù)器內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
解決FileZilla_Server:425 Can''t open data connection 問題詳解
在騰訊云服務(wù)器上安裝FileZilla Server時出現(xiàn)425 Can't open data connection客戶端無法獲取目錄列表的問題,下面就是解決這個問題的方法2018-10-10
win10下VSCode+CMake+Clang+GCC環(huán)境搭建教程圖解
這篇文章主要介紹了win10下VSCode+CMake+Clang+GCC環(huán)境搭建,本文圖文并茂給大家介紹的非常詳細(xì),具有一定的參考借鑒價值,需要的朋友可以參考下2019-10-10

