1、centos6.5

  • CentOS-6.5-x86_64-bin-DVD1.iso
  • 安装参考
# Kickstart file automatically generated by anaconda.#version=DEVEL
install
cdrom
lang en_US.UTF-8
keyboard us
network --onboot no --device eth0 --bootproto dhcp --noipv6
rootpw  --iscrypted $6$oOPRW2wimev3SGXr$kxDzyr9FKt1fiwK5qRcBmfMKJYBeU6vxowhkJgCYjNhp5ATLbd2kBMKkm1kj6Gkg6wZbm66f8STvlve/Skme41
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc Asia/Shanghai
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --all --drives=sda#part /boot --fstype=ext4 --size=500
#part pv.008002 --grow --size=1#volgroup vg_yinheos --pesize=4096 pv.008002
#logvol / --fstype=ext4 --name=lv_root --vgname=vg_yinheos --grow --size=1024 --maxsize=51200
#logvol swap --name=lv_swap --vgname=vg_yinheos --grow --size=1984 --maxsize=1984repo --name="CentOS"  --baseurl=cdrom:sr0 --cost=100%packages
@core
@server-policy
@workstation-policy
%end

centos6全自动化版本

#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use CDROM installation media
cdrom
# Root password 123456
rootpw --iscrypted $6$T.MxIMkFy2EcUTPM$n0aRTj4b4zfuqf9pw0oVSzlsqnf1X9.uEQkOvjXbZX9oR14w06knBK3Ejv8W01yEXj3c/HLKAaou2EurL04rz0# System authorization information
auth  --useshadow  --passalgo=sha512
# Use graphical install
graphical
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# Installation logging level
logging --level=info
# Reboot after installation
#reboot
# System timezone
timezone --isUtc 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 --initlabel
# Disk partitioning information
autopart
#part /boot --asprimary --fstype=ext4 --ondisk=sda --size=200
#part swap --asprimary --fstype=swap --ondisk=sda --size=1024
#part / --asprimary --fstype=ext4 --grow --ondisk=sda --size=1
reboot --eject
unsupported_hardware
%packages
@core
@server-policy
@workstation-policy
kernel-3.10.0
kernel-devel-3.10.0
kernel-firmware-3.10.0
kernel-headers-3.10.0
%end
%pre  --interpreter /bin/sh   --log=/root/my-pre-logexportPATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ln -s -T /mnt/runtime/opt /opt
mkdir /newroot
mount tmpfs /newroot -t tmpfs
cp -a /mnt/runtime/*  /newroot/
ls /mnt/runtime/
mount /proc /newroot/proc  -o bind
mount /dev /newroot/dev  -o bind
mount /sys /newroot/sys  -o bind
# chroot to runipmitool/hpasmcli/omreport
chroot /newroot
delete_raid() {raid_controller=`/usr/bin/opt/MegaRAID/storcli/storcli64 /call show all|grep -w "Controller"|sed -n "1p"|awk '{print $NF}'`raid_disk_num=`/usr/bin/opt/MegaRAID/storcli/storcli64 /call show all|grep -w "Physical Drives"|sed -n "1p"|awk '{print $NF}'`for i in `/usr/bin/seq 0 ${raid_disk_num}`;do /usr/bin/opt/MegaRAID/storcli/storcli64 /c${raid_controller}/v${i} del force;done}
set_raid() {raid_controller=`/usr/bin/opt/MegaRAID/storcli/storcli64 /call show all|grep -w "Controller"|sed -n "1p"|awk '{print $NF}'`raid_disk_num=`/usr/bin/opt/MegaRAID/storcli/storcli64 /call show all|grep -w "Physical Drives"|sed -n "1p"|awk '{print $NF}'`/usr/bin/opt/MegaRAID/storcli/storcli64 /c0 add vd r1 size=all name=diskarray1 drives=${raid_controller}:0,${raid_controller}:1 awb ra cached strip=256for i in `/usr/bin/seq 2 ${raid_disk_num}`;do /usr/bin/opt/MegaRAID/storcli/storcli64 /c${raid_controller} add vd r0 size=all name=diskarray${i} drives=${raid_controller}:${i} awb ra cached strip=256;done
}
main() {delete_raidset_raidreturn 0#/usr/sbin/reboot
}# Here we start
main%end%post --nochroot
mkdir -p /mnt/sysimage/{post_install,local_yumrepo}
mkdir -p /mnt/sysimage/data/{sources,scripts}
%end%post
chmod a+x  /etc/rc.d/rc.local
echo "function run_postinstall() {usb=\`blkid|grep -w \"YoucaoOS\"|awk -F ':' '{print \$1}'|sed \"s/^.*\///g\"|sed \"s/[0-9]*//g\"\`if [ \"\${usb}\" ];thenmkdir -p /tempMount/umount -lf /dev/\${usb}2mount /dev/\${usb}2 /tempMountcp -ar --no-preserve=mode,ownership /tempMount/postInstall /post_installcd /post_install/postInstallchmod a+x postinstall.shsh postinstall.shfireturn 0
}
run_postinstall | tee -a /root/runpost.log " >> /etc/rc.d/rc.local
%end

2、centos7.5

  • CentOS-7-x86_64-DVD-1804.iso
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8# Network information
network  --bootproto=dhcp --device=ens33 --onboot=off --ipv6=auto --no-activate
network  --hostname=localhost.localdomain# Root password
rootpw --iscrypted $6$LG8sCcs8Z3iOUfhr$FTi4JkCvzYzkit4PjnSXdFXkShQeaa1oY.k8bE52WD2mVKRVpgX8wkgAbyIMgnUizDzQPFHQFKXboJhoFQHC1.
# System services
services --enabled="chronyd"
# System timezone
timezone America/New_York --isUtc
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel%packages
@^minimal
@core
chrony
kexec-tools%end%addon com_redhat_kdump --enable --reserve-mb='auto'%end%anaconda
pwpolicy root --minlen=6 --minquality=50 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=50 --notstrict --nochanges --notempty
pwpolicy luks --minlen=6 --minquality=50 --notstrict --nochanges --notempty
%end

3、centos8

  • CentOS-8.2.2004-x86_64-dvd1.iso
#version=RHEL8
ignoredisk --only-use=sda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel
# Use graphical install
graphical
# Use CDROM installation media
cdrom
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8# Network information
network  --bootproto=dhcp --device=enp0s3 --onboot=off --ipv6=auto --no-activate
network  --hostname=localhost.localdomain
repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream
# Root password
rootpw --iscrypted $6$SU87rVMTtdKvUSVD$4MZ4NYjBkqBhRvfVe1i8gcZSL6dCa9pM2vzY00GXU9N367a8mn6ijY3zYekmmQF6S/H7GLgF4efKGSgUNB1iR0
# X Window System configuration information
xconfig  --startxonboot
# Run the Setup Agent on first boot
firstboot --enable
# System services
services --disabled="chronyd"
# System timezone
timezone Asia/Shanghai --isUtc --nontp%packages
@^graphical-server-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

不同版本的centos默认的ks.cfg相关推荐

  1. centos 8 卸载anaconda_搭建CentOS+PXE+ks.cfg自动装机总结

    2014-07-21 : 搭建主要步骤 易错点 不明白的地方 主要步骤: 今天主要做的事就是搭建了一个自动装机环境,使用了CentOS6.5+PXE+DHCP+Apache+NFS+KickStart ...

  2. centos 默认php 版本太低移到高版本的办法

    // centos 默认有php 版本太低转移到高版本的解决办法 php -v 版本低 ln -s /usr/local/php/bin/php /usr/bin/php 转载于:https://ww ...

  3. Linux下载cfg命令,Linux安装详解-配置ks.cfg实现自动安装过程

    之前发过一篇关于通过PXE实现Linux批量无人值守自动安装的文章(可以参考http://www.linuxidc.com/Linux/2011-08/39949.htm),不过写的只是具体的配置和操 ...

  4. PXE配置中ks.cfg文件介绍

    ks.cfg文件:又称Kickstart文件,主要用于Linux系统的自动化安装. 在CentOS系统中 /root/anaconda-ks.cfg就是一个ks.cfg文件,它指明了当前系统预安装环境 ...

  5. linux ks脚本,Linux ks.cfg 详解

    linux安装大致可以分为2个阶段 第一阶段:anaconda 第二阶段:installinstall阶段系统会按照anaconda阶段设定的参数自动安装,这里主要要说的是anaconda阶段,此阶段 ...

  6. linux添加cfg,Linux安装详解-配置ks.cfg实现自动安装过程

    Linux安装详解-配置ks.cfg实现自动安装过程 之前发过一篇关于通过PXE实现Linux批量无人值守自动安装的文章(可以参考),不过写的只是具体的配置和操作,对于原理部分没有说明,最近通过一段时 ...

  7. linux ks脚本,linux安装详解-配置ks.cfg实现自动安装过程

    linux安装大致可以分为2个阶段 第一阶段:anaconda 第二阶段:installinstall阶段系统会按照anaconda阶段设定的参数自动安装,这里主要要说的是anaconda阶段,此阶段 ...

  8. 提取ESX/ESXI4.0脚本安装文件ks.cfg、ks-first.cfg和ks-first-safe.cfg

    ks.cfg.ks-first.cfg和ks-first-safe.cfg 3个文件为ESX/ESXI脚本安装文件 官方<ESXi Installable 和 vCenter Server 安装 ...

  9. linux自动应答,08. 创建 ks.cfg自动应答文件

    Kiskstart 安装步骤比较 Cobbler 自动化部署复杂些,众所周知,随着时间推移,行业会逐步的降低软件操作难度以作为软件提升的标志,于是 Cobbler 产生掩盖或者帮操作者完成了许多工作, ...

  10. Linux 安装python 3.8(Linux 的版本为 Centos 7)

    Linux 安装python 3.8(Linux 的版本为 Centos 7) 前言:喜欢傻瓜式复制粘贴的,不会思考安装过程中报错的,不建议看这个,可以去看看其他的,看了安装不了,又喷人,自己不会,解 ...

最新文章

  1. OpenStack icehouse系列之计算节点搭建
  2. 互联网协议套件(TCP/IP)及七层OSI模型
  3. 数据结构-排序进阶代码
  4. 解决在iOS8环境下,当用户关闭定位服务总开关时,无法将APP定位子选项加入定位权限列表的问题...
  5. C++开源矩阵计算工具——Eigen 在VS2005中的下载、配置与使用
  6. SAP License:雾里看花系列——做管理还要懂SAP吗?
  7. CSDN 创始人蒋涛:选择长沙作“大本营”,打造开发者中心城市
  8. php连接mysql配置环境变量_Win7 64位操作系统下配置PHP+MySql+Apache环境(转)
  9. 有没有那种免费的办公软件?
  10. 谷梁科技多元化一卡通系统应用
  11. 水晶报表10.0企业版下载地址及注册码
  12. 《托福写作——100 个替换词汇》
  13. Pseudo-伪标签
  14. 东东在用计算机计算一道题时 把被除数的前,北师大二年级数学下册期末试卷...
  15. 看看乔帮主留下的世界
  16. 腾讯云通信WebIM事件回调的坑~
  17. 【组合数学】递推方程 ( 特解形式 | 特解求法 | 特解示例 )
  18. 使用GBase企业管理器执行 select count(1) into @c from t1;报错解决方案
  19. 计算机图形学(相关网址+大牛推荐+随时补充)
  20. 2021年高考大连8中成绩查询,2021年新高考适应性考试成绩怎么查?八省联考成绩可以保留吗?...

热门文章

  1. 2019厦门大学计算机复试,2019年厦门大学考研复试分数线已出现
  2. [转]仙剑4破解方法详解[图]
  3. 蓝桥杯 算法训练 ALGO-114 黑白无常
  4. (一)RFB协议概述
  5. 机器学习读书笔记:假设检验(一)
  6. CentOS7自动发送邮件配置
  7. matlab内置随机数生成器及随机模拟举例
  8. “双评价”——ArcGIS水资源评价
  9. 企业内部知识共享平台的搭建和应用
  10. 电脑ps4,Windows电脑玩PS4游戏,索尼:先来升级Win10吧