cat /var/lib/tftpboot/ks.cfg
#platform=x86, AMD64, 或 Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --iscrypted $1$fu4CwNue$NpzCFx7OTL4w9xPWv4TEN1
# System timezone
timezone Asia/Shanghai
# Use network installation
url --url="http://192.168.8.35/"
# System language
lang zh_CN
# Firewall configuration
firewall --disabled
# System authorization information
auth --useshadow --passalgo=sha512
# Use graphical install
graphical
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# Reboot after installation
reboot
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="xfs" --size=500
part swap --fstype="swap" --size=4096
part / --fstype="xfs" --grow --size=1
%post
wget -O /tmp/install.sh
/bin/bash /tmp/install.sh
%end
%packages
@development
%end
cat /var/lib/tftpboot/install.sh
#!/bin/bash
##############################################################
# File Name: install cenos 7.2
# Version: V1.0
# Created Time : 2017年06月13日 17:35:05
# Description: Linux system initialization
##############################################################
yum -y install net-tools vim ntpdate
rm -rf /etc/yum.repos.d/Cent*
cat << EOF >> /etc/yum.repos.d/yum.repo
[development]
name=yum
baseurl=file:///opt/cdrom/
enable=1
gpgcheck=0
[epel]
name=epel_rpm
baseurl=http://192.168.9.19:81/epel7/
enable=1
gpgcheck=0
EOF
IPADDR=`ifconfig | grep "192.168.8.255" | awk '{print $2}'`
cat << EOF >> /etc/sysconfig/network-scripts/ifcfg-eno16777984
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777984
UUID=fbacacf0-ee9a-4c3a-af76-c49d4789170b
DEVICE=eno16777984
ONBOOT=yes
IPADDR=$IPADDR
PREFIX=24
GATEWAY=192.168.8.1
DNS1=114.114.114.114
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no
EOF
echo "* */1 * * * ntpdate 192.168.8.35 2&> /dev/null &" > /var/spool/cron/root
基于 Open vSwitch 的 OpenFlow 亲测实践
相关资讯 PXE Kickstact安装CentOS 7.3
本文评论 查看全部评论 (0)
尊重网上道德,遵守中华人民共和国的各项有关法律法规 承担一切因您的行为而直接或间接导致的民事或刑事法律责任 本站管理人员有权保留或删除其管辖留言中的任意内容 本站有权在网站内转载或引用您的评论 参与本评论即表明您已经阅读并接受上述条款
评论声明
最新资讯