linux安装配置kickstart
发表于:2026-11-03 作者:千家信息网编辑
千家信息网最后更新 2026年11月03日,1、安装配置kickstart要使用kickstrt安装平台,包括的完整架构为:Kickstart + DHCP+ NFS+TFTP+PXE,从架构可以看出大致需要安装的服务,例如dbcp、tftp、
千家信息网最后更新 2026年11月03日linux安装配置kickstart1、安装配置kickstart
要使用kickstrt安装平台,包括的完整架构为:Kickstart + DHCP+ NFS+TFTP+PXE,从架构可以看出
大致需要安装的服务,例如dbcp、tftp、nfs、kickstart/pxe等
挂在镜像
mount /dev/cdrom /mnt
df -h
1)DHCP、Tftp安装
yum install -y dhcp* tftp* syslinux
首先配置tftp服务:
vi /etc/xinetd.d/tftp
disable = no
只需要把disable=yes 改成disbale=no即可
2)TFTP +PXE配置
要实现远程安装系统,首先需要在TFTpboot目录指定相关PXE内核模块以及相关参数,
配置步骤如下:
#如果系统是5.X,默认tftpboot目录已经自动创建到/根目录下
#如果系统是6.X,默认tftpboot目录在/var/lib/下,所以linux 6.x需要做软链接/根目录下。
查看/根下是否有/tftpboot目录,如果没有需要做软链接
ln -s /var/lib/tftpboot/ /
cd /tftpboot/
find / -name pxelinux.0
cp /usr/share/syslinux/pxelinux.0 ./
cp /mnt/images/pxeboot/{initrd.img,vmlinuz} ./
将所有内容拷贝内核到/tftpboot目录下
mkdir -p /tftpboot/pxelinux.cfg
cd /tftpboot/pxelinux.cfg
cp /mnt/isolinux/isolinux.cfg default
chmod 777 /tftpboot/pxelinux.cfg/default
vi /tftpboot/pxelinux.cfg/default
添加如下:
label Rehel6.5
kernel vmlinuz
append ks=nfs:192.168.56.77:/centosinstall/ks.cfg ksdevice=eth0 initrd=initrd.img
安装nfs服务
yum install -y nfs*
用NFs或者httpd把镜像文件共享出来
mkdir -p /centosinstall
nohup cp -rf /mnt/* /centosinstall &
echo "/centosinstall *(rw,sync)" >>/etc/exports
cd /centosinstall
vi ks.cfg
[root@localhost ~]# cat ks.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
key --skip
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use NFS installation media
nfs --server=192.168.56.77 --dir=/centosinstall
# Root password
rootpw --iscrypted $1$9g6qXfWW$b3ofuFBbrusMKae5R5d6Z.
# System authorization information
auth --useshadow --passalgo=sha512
# Use text mode install
text
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone Asia/Shanghai
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all
# Disk partitioning information
part swap --fstype="swap" --size=4096
part /boot --fstype="ext4" --size=200
part / --fstype="ext4" --grow --size=1
%packages
@admin-tools
@base
@core
@development-libs
@development-tools
@x11
%end
chmod 777 ks.cfg
或者使用yum install system-config-kickstart.noarch 终端中运行system-config-kickstart命令 图像界面生成ks.cfg文件
启动nfs、tftp服务
service nfs restart
service xinetd restart
配置dhcp服务
yum install -y dbcp*
vi /etc/dhcp/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.56.0 netmask 255.255.255.0 {
option routers 192.168.56.1;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.56.88 192.168.56.200;
next-server 192.168.56.77;
filename "pxelinux.0";
allow booting;
allow bootp;
}
service dhcpd restart
创建客户端client
输入标签
Rehel6.5
要使用kickstrt安装平台,包括的完整架构为:Kickstart + DHCP+ NFS+TFTP+PXE,从架构可以看出
大致需要安装的服务,例如dbcp、tftp、nfs、kickstart/pxe等
挂在镜像
mount /dev/cdrom /mnt
df -h
1)DHCP、Tftp安装
yum install -y dhcp* tftp* syslinux
首先配置tftp服务:
vi /etc/xinetd.d/tftp
disable = no
只需要把disable=yes 改成disbale=no即可
2)TFTP +PXE配置
要实现远程安装系统,首先需要在TFTpboot目录指定相关PXE内核模块以及相关参数,
配置步骤如下:
#如果系统是5.X,默认tftpboot目录已经自动创建到/根目录下
#如果系统是6.X,默认tftpboot目录在/var/lib/下,所以linux 6.x需要做软链接/根目录下。
查看/根下是否有/tftpboot目录,如果没有需要做软链接
ln -s /var/lib/tftpboot/ /
cd /tftpboot/
find / -name pxelinux.0
cp /usr/share/syslinux/pxelinux.0 ./
cp /mnt/images/pxeboot/{initrd.img,vmlinuz} ./
将所有内容拷贝内核到/tftpboot目录下
mkdir -p /tftpboot/pxelinux.cfg
cd /tftpboot/pxelinux.cfg
cp /mnt/isolinux/isolinux.cfg default
chmod 777 /tftpboot/pxelinux.cfg/default
vi /tftpboot/pxelinux.cfg/default
添加如下:
label Rehel6.5
kernel vmlinuz
append ks=nfs:192.168.56.77:/centosinstall/ks.cfg ksdevice=eth0 initrd=initrd.img
安装nfs服务
yum install -y nfs*
用NFs或者httpd把镜像文件共享出来
mkdir -p /centosinstall
nohup cp -rf /mnt/* /centosinstall &
echo "/centosinstall *(rw,sync)" >>/etc/exports
cd /centosinstall
vi ks.cfg
[root@localhost ~]# cat ks.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
key --skip
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use NFS installation media
nfs --server=192.168.56.77 --dir=/centosinstall
# Root password
rootpw --iscrypted $1$9g6qXfWW$b3ofuFBbrusMKae5R5d6Z.
# System authorization information
auth --useshadow --passalgo=sha512
# Use text mode install
text
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone Asia/Shanghai
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all
# Disk partitioning information
part swap --fstype="swap" --size=4096
part /boot --fstype="ext4" --size=200
part / --fstype="ext4" --grow --size=1
%packages
@admin-tools
@base
@core
@development-libs
@development-tools
@x11
%end
chmod 777 ks.cfg
或者使用yum install system-config-kickstart.noarch 终端中运行system-config-kickstart命令 图像界面生成ks.cfg文件
启动nfs、tftp服务
service nfs restart
service xinetd restart
配置dhcp服务
yum install -y dbcp*
vi /etc/dhcp/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.56.0 netmask 255.255.255.0 {
option routers 192.168.56.1;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.56.88 192.168.56.200;
next-server 192.168.56.77;
filename "pxelinux.0";
allow booting;
allow bootp;
}
service dhcpd restart
创建客户端client
输入标签
Rehel6.5
配置
目录
服务
系统
内核
文件
架构
根目录
链接
镜像
内容
参数
命令
图像
客户
客户端
平台
拷贝
标签
模块
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
广州淘业互联网络科技
深圳互联网络科技有限公司
紫鲸互联网科技
互联网科技论文
金融科技和互联网金融
深圳互联网科技怎么样
互联网和高科技公司
玖二柒互联网科技公司待遇
北京三清互联网科技
常德市电业局互联网科技部
互联网大会黑科技排名
佳云科技和互联网广告
科技赋能视角下互联网保险发展
长沙渺峰互联网科技有限公司
北京天晋互联网科技有限公司
科技和互联网行业的特点
互联网科技和医药行业
互联网科技的前景
深圳互联网科技园地址
恒生科技互联网指数十大成分股
互联网为科技
深圳科技互联网
科技与互联网发展
金融科技与互联网金融
小马过河互联网科技
中正互联网科技招聘
广州市恰铎互联网科技有限公司
哈尔滨屹滨互联网科技有限公司
陕西云淼互联网科技公司
亚光科技低轨卫星互联网