Heim  >  Artikel  >  Betrieb und Instandhaltung  >  So installieren Sie das Betriebssystem automatisch auf Centos8 basierend auf PXE

So installieren Sie das Betriebssystem automatisch auf Centos8 basierend auf PXE

藏色散人
藏色散人nach vorne
2021-05-26 16:57:263760Durchsuche

Die Tutorial-Kolumne von centos stellt Ihnen die automatische Installation des Centos8-Betriebssystems basierend auf PXE vor. Ich hoffe, dass es Freunden in Not hilfreich sein wird!

PXE-Serverkonfiguration

Zugehörige Software installieren

dnf install -y httpd tftp-server dhcp-server syslinux-nonlinux

DHcp konfigurieren

vim /etc/dhcp/dhcpd.conf
subnet 192.168.43.0 netmask 255.255.255.0 {
range 192.168.43.100 192.168.43.200;
option routers 192.168.43.2;
option domain-name "xuepeng.com";
option domain-name-servers 180.76.76.76, 114.114.114.114;
next-server 192.168.43.8;
filename "pxelinux.0";
}

Sofort starten, der Dienst wird nach dem Booten automatisch gestartet

systemctl enable --now tftp dhcpd httpd

Bereiten Sie relevante Verzeichnisse zum Mounten von CDs vor

Fügen Sie im Voraus drei optische Laufwerke hinzu und legen Sie sie in Centos6 ein. 7 bzw. 8 CD

mkdir -p /var/www/html/Centos/{6,7,8}/os/x86_64
mount /dev/sr0 /var/www/html/Centos/8/os/x86_64/
mount /dev/sr1 /var/www/html/Centos/6/os/x86_64/
mount /dev/sr2 /var/www/html/Centos/7/os/x86_64/

Verschieben Sie die ks-Datei nach /var/www/html/ksdir

Centos6, 7, 8 ks.cfg

mkdir /var/www/html/ksdir
mv ks{6,7,8}.cfg /var/www/html/ksdir

Bereiten Sie sich darauf vor, die Startup-bezogenen Dateien in /var/lib/tftpboot abzulegen Verzeichnis

  1. initre. img, vmlinuz von der CD
  2. menu.c32, pxelinux.0 vom syslinux-nonlinux-Paket
  3. ldlinux.c32, libcom32.c32, libutil.c32 von der Centos8-CD
  4. pxelinux.cfg-Verzeichnis, das Sie selbst erstellt haben
    /var/lib/tftpboot/├── Centos6│   ├── initrd.img│   └── vmlinuz├── Centos7│   ├── initrd.img│   └── vmlinuz├── Centos8│   ├── initrd.img│   └── vmlinuz├── ldlinux.c32├── libcom32.c32├── libutil.c32├── menu.c32├── pxelinux.0└── pxelinux.cfg└── default

/var/lib/tftpboot/pxelinux.cfg/default Dateiinhalt

default menu.c32
timeout 600
menu title PXE Auto Install Centos


label mini 6
  menu label ^Install CentOS Mini ^6
  kernel Centos6/vmlinuz
  append initrd=Centos6/initrd.img ks=http://192.168.43.8/ksdir/ks6.cfg


label mini 7
  menu label ^Install CentOS Mini ^7
  kernel Centos7/vmlinuz
  append initrd=Centos7/initrd.img ks=http://192.168.43.8/ksdir/ks7.cfg

label mini 8
  menu label ^Install CentOS Mini ^8
  kernel Centos8/vmlinuz
  append initrd=Centos8/initrd.img ks=http://192.168.43.8/ksdir/ks8.cfg


label manual
  menu label ^Manual Install Centos Linux 8
  kernel Centos8/vmlinuz
  append initrd=Centos8/initrd.img inst.repo=http://192.168.43.8/Centos/8/os/x86_64

label rescue
  menu label ^Rescue a CentOS Linux system 8
  kernel Centos8/vmlinuz
  append initrd=Centos8/initrd.img ks=http://192.168.43.8/ksdir/ks8.cfg rescue quiet

label rescue
  menu label ^Rescue a CentOS Linux system 7
  kernel Centos7/vmlinuz
  append initrd=Centos7/initrd.img ks=http://192.168.43.8/ksdir/ks7.cfg rescue quiet


label rescue
  menu label ^Rescue a CentOS Linux system 6
  kernel Centos6/vmlinuz
  append initrd=Centos6/initrd.img ks=http://192.168.43.8/ksdir/ks6.cfg rescue quiet

label local
  menu default
  menu label Boot from ^local drive
  localboot 0xffff

pxe-Client-Konfiguration

Öffnen Sie eine neue virtuelle Maschine und starten Sie sie von der Netzwerkkarte aus
So installieren Sie das Betriebssystem automatisch auf Centos8 basierend auf PXE
So installieren Sie das Betriebssystem automatisch auf Centos8 basierend auf PXE
Das System installiert die Software automatisch Paket
So installieren Sie das Betriebssystem automatisch auf Centos8 basierend auf PXE
Betreten Sie das System
So installieren Sie das Betriebssystem automatisch auf Centos8 basierend auf PXE

Das obige ist der detaillierte Inhalt vonSo installieren Sie das Betriebssystem automatisch auf Centos8 basierend auf PXE. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Dieser Artikel ist reproduziert unter:csdn.net. Bei Verstößen wenden Sie sich bitte an admin@php.cn löschen