安装系统时的应答文件,其中包括在典型安装过程中可能会问的所有问题的答案。
10年积累的成都网站建设、网站设计经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先建设网站后付款的网站建设流程,更有四方台免费网站建设让你可以放心的选择与我们合作。
Kickstart Configurator 允许使用图形用户界面创建和修改 kickstart 文件,这样就需要记住文件的正确语法。
默认情况下,不会在 Red Hat Enterprise Linux 6 中安装 Kickstart Configurator。运行yum install system-config-kickstart,或使用图形化软件包管理器安装这个软件。
要启动 Kickstart Configurator,请将系统引导至图形环境,然后运行 system-config-kickstart,或在 GNOME 桌面上点击 应用程序 → 系统工具 → Kickstart,或者在 KDE 桌面上点击 开始应用程序启动器+应用程序 → 系统 → Kickstart。
创建 kickstart 文件时,可以在任何时候选择 File → Preview 查看当前的选择。
要修改现有的 kickstart 文件,选择 File → Open File,并选择文件。
selinux:关闭
firewalld:关闭
os:centos7
ip:192.168.7.81
[root@CentOS8 yum.repos.d]# dnf install dhcp-server tftp-server httpd syslinux-nonlinux -y
注:syslinux-nonlinux这个包,在6,7系统上叫syslinux
[root@CentOS8 ~]# systemctl enable --now httpd tftp dhcpd
[root@CentOS8 ~]# mkdir /var/www/html/centos/{6,7,8}/isos/x86_64/ -p
[root@CentOS8 ~]# mount /dev/sr0 /var/www/html/centos/8/isos/x86_64/
[root@CentOS8 ~]# mkdir /var/www/html/ksdir
[root@CentOS8 ~]# cat /var/www/html/ksdir/ks8.cfg
ignoredisk --only-use=sda
zerombr
text
reboot
clearpart --all --initlabel
selinux --disabled
firewall --disabled
url --url=http://192.168.7.81/centos/8/isos/x86_64/
keyboard --vckeymap=us --xlayouts='us'
lang en_US.UTF-8
network --bootproto=dhcp --device=ens160 --ipv6=auto --activate
network --hostname=centos8-pxe
rootpw --iscrypted $6$nOPs5JTMlP4mhQeW$R/o62B6SXAh4RR.zrZ3U0X4xYX9/u5nSLrR/vqCB6kdO2XFfMk2a4yAgrHJQpXK/e4jzRb0jiLBv2nFMXaBjB/
firstboot --enable
skipx
services --disabled="chronyd"
timezone Asia/Shanghai --isUtc --nontp
user --name=hechunping --password=$6$oUfb/02CWfLb5l8f$sgEZeR7c7DpqfpmFDH6huSmDbW1XQNR4qKl2EPns.gOXqlnAIgv9pTogtFVaDtEpMOC.SWXKYqxfVtd9MCwxb1 --iscrypted --gecos="hechunping"
part / --fstype="xfs" --ondisk=sda --size=102400
part /data --fstype="xfs" --ondisk=sda --size=51200
part swap --fstype="swap" --ondisk=sda --size=2048
part /boot --fstype="ext4" --ondisk=sda --size=1024
%packages
@^minimal-environment
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
[root@CentOS8 ~]# cp -p /usr/share/doc/dhcp-server/dhcpd.conf.example /etc/dhcp/dhcpd.conf
[root@CentOS8 ~]# grep -Ev "^#|^$" /etc/dhcp/dhcpd.conf
option domain-name "example.org";
option domain-name-servers 180.76.76.76,223.5.5.5;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.7.0 netmask 255.255.255.0 {
range 192.168.7.100 192.168.7.200;
option routers 192.168.7.2;
next-server 192.168.7.81;
filename "pxelinux.0";
}
[root@CentOS8 ~]# systemctl restart dhcpd
[root@CentOS8 ~]# cp -p /usr/share/syslinux/{pxelinux.0,menu.c32} /var/lib/tftpboot/
[root@CentOS8 ~]# cp -p /var/www/html/centos/8/isos/x86_64/isolinux/{ldlinux.c32,libcom32.c32,libutil.c32} /var/lib/tftpboot/
[root@CentOS8 ~]# mkdir /var/lib/tftpboot/pxelinux.cfg/
[root@CentOS8 ~]# cp -p /var/www/html/centos/8/isos/x86_64/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
[root@CentOS8 ~]# cp -p /var/www/html/centos/6/isos/x86_64/isolinux/{initrd.img,vmlinuz} /var/lib/tftpboot/6/
[root@CentOS8 ~]# cp -p /var/www/html/centos/7/isos/x86_64/isolinux/{initrd.img,vmlinuz} /var/lib/tftpboot/7/
[root@CentOS8 ~]# cp -p /var/www/html/centos/8/isos/x86_64/isolinux/{initrd.img,vmlinuz} /var/lib/tftpboot/8/
[root@CentOS8 ~]# tree /var/lib/tftpboot/
/var/lib/tftpboot/
├── 6
│ ├── initrd.img
│ └── vmlinuz
├── 7
│ ├── initrd.img
│ └── vmlinuz
├── 8
│ ├── initrd.img
│ └── vmlinuz
├── ldlinux.c32
├── libcom32.c32
├── libutil.c32
├── menu.c32
├── pxelinux.0
└── pxelinux.cfg
└── default
[root@CentOS8 ~]# cat /var/lib/tftpboot/pxelinux.cfg/default
default menu.c32
timeout 600
menu title CentOS Linux
label linux8
menu label Auto Install CentOS Linux ^8.0 Mini
kernel 8/vmlinuz
append initrd=8/initrd.img ks=http://192.168.7.81/ksdir/ks8.cfg
label linux7
menu label Auto Install CentOS Linux ^7 Mini
kernel 7/vmlinuz
append initrd=7/initrd.img ks=http://192.168.7.81/ksdir/ks7.cfg
label linux6
menu label Auto Install CentOS Linux ^6 Mini
kernel 6/vmlinuz
append initrd=6/initrd.img ks=http://192.168.7.81/ksdir/ks6.cfg
label manual
menu label ^Manual Install CentOS Linux 8.0
kernel vmlinuz
append initrd=initrd.img inst.repo=http://192.168.7.81/centos/8/isos/x86_64/
label local
menu default
menu label Boot from ^local drive
localboot 0xffff
[root@CentOS8 ~]# systemctl restart tftp
[root@CentOS7-01 ~]#yum install cobbler dhcp tftp httpd -y
[root@CentOS7-01 ~]#systemctl enable --now cobblerd httpd tftp dhcpd
这里报dhcpd服务错误,是因为还没有配置相关文件,先不用管,继续往下做
[root@CentOS7-01 ~]#cobbler check
The following are potential configuration items that you may want to fix:
1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work. This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
3 : change 'disable' to 'no' in /etc/xinetd.d/tftp
4 : Some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
5 : enable and start rsyncd.service with systemctl
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : ksvalidator was not found, install pykickstart
8 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
9 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
Restart cobblerd and then run 'cobbler sync' to apply changes.
server: 192.168.7.71
next_server: 192.168.7.71
disable = no
manage_dhcp: 1
[root@CentOS7-01 ~]#cobbler get-loaders
subnet 192.168.7.0 netmask 255.255.255.0 {
option routers 192.168.7.2;
option domain-name-servers 8.8.8.8;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.7.100 192.168.7.254;
[root@CentOS7-01 ~]#cobbler sync
...中间省略信息...
*** TASK COMPLETE ***
[root@CentOS7-01 ~]#systemctl restart dhcpd
[root@CentOS7-01 ~]#mount /dev/sr0 /mnt
[root@CentOS7-01 ~]#cobbler import --name=centos8-x86_64 --path=/mnt --arch=x86_64
[root@CentOS7-01 ~]#cat /var/lib/cobbler/kickstarts/ks8.cfg
#version=RHEL8
ignoredisk --only-use=sda
zerombr
text
reboot
# Partition clearing information
clearpart --all --initlabel
selinux --disabled
firewall --disabled
# Use graphical install
url --url=$tree
# Use CDROM installation media
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=dhcp --device=ens160 --ipv6=auto --activate
network --hostname=centos8
# Root password
rootpw --iscrypted $6$nOPs5JTMlP4mhQeW$R/o62B6SXAh4RR.zrZ3U0X4xYX9/u5nSLrR/vqCB6kdO2XFfMk2a4yAgrHJQpXK/e4jzRb0jiLBv2nFMXaBjB/
# Run the Setup Agent on first boot
firstboot --enable
# Do not configure the X Window System
skipx
# System services
services --disabled="chronyd"
# System timezone
timezone Asia/Shanghai --isUtc --nontp
user --name=hechunping --password=$6$oUfb/02CWfLb5l8f$sgEZeR7c7DpqfpmFDH6huSmDbW1XQNR4qKl2EPns.gOXqlnAIgv9pTogtFVaDtEpMOC.SWXKYqxfVtd9MCwxb1 --iscrypted --gecos="hechunping"
# Disk partitioning information
part / --fstype="xfs" --ondisk=sda --size=102400
part /data --fstype="xfs" --ondisk=sda --size=51200
part swap --fstype="swap" --ondisk=sda --size=2048
part /boot --fstype="ext4" --ondisk=sda --size=1024
%packages
@^minimal-environment
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
[root@CentOS7-01 ~]#cobbler profile add --name=centos8 --distro=centos8-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ks8.cfg
[root@CentOS7-01 ~]#cobbler profile list
[root@CentOS7-01 ~]#cat /var/lib/tftpboot/pxelinux.cfg/default