A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

本帖最后由 xiaozuoquan 于 2019-3-28 16:35 编辑

Cobbler 配置文件

Cobbler(配置文件)

Centos 7.3 x86_64 下的配置文件模板
Centos-7.3-x86_64.cfg


[AppleScript] 纯文本查看 复制代码
#Kickstart Configurator by BrandynX
#platform=x86, AMD64, or Intel EM64T

#System  language
lang en_US

#System keyboard
keyboard us

#Install OS instead of upgrade
install

#Use text mode install
text

#Sytem timezone
timezone Asia/Shanghai

#Use NFS installation Media
url --url=$tree

#Root password
rootpw --iscrypted $default_password_crypted

#Network information
$SNIPPET('network_config')
#network --bootproto=dhcp --device=eth0 --onboot=on

#System authorization infomation
auth  --useshadow  --enablemd5

#Firewall configuration
firewall --disabled

#SELinux configuration
selinux --disabled

# Reboot after installation
reboot

#System bootloader configuration
bootloader --location=mbr

#Clear the Master Boot Record
zerombr

#Partition clearing information
clearpart --all --initlabel

#Disk partitioning information
part /boot --fstype xfs --size 1024 --ondisk sda
#Oracle:part swap --size 16384 --ondisk sda
part swap --size 2048 --ondisk sda
part / --fstype xfs --size 1 --grow --ondisk sda


#Do not configure XWindows
skipx

%pre
$SNIPPET('log_ks_pre')
$SNIPPET('kickstart_start')
$SNIPPET('pre_install_network_config')
# Enable installation monitoring
$SNIPPET('pre_anamon')
%end


#Package install information
%packages
@base
@core
@fonts
@performance tools
%end


%post
$yum_config_stanza
wget -O /tmp/c7_op_script.tar.gz http://192.168.0.238/c7_op_script.tar.gz
cd /tmp && tar xzf c7_op_script.tar.gz
chmod +x -R /tmp/c7_op_script/* 
cd /tmp/c7_op_script/sys_optimiz && /bin/sh -x  centos7_optimiz.sh
%end
Centos 6.8 x86_64 下的配置文件模板
Centos-6.8-x86_64.cfg

#Kickstart Configurator by BrandynX
#platform=x86, AMD64, or Intel EM64T

# System language
lang en_US

# System keyboard
keyboard us

# Install OS instead of upgrade
install

# Use graphical install
text
firstboot --disable

# System timezone
timezone  Asia/Shanghai

# Use network installation
url --url=$tree
#url --url="http://192.168.0.238/cobbler/ks_mirror/Centos-6.8-x86_64/"

# Root password 123qwe!@#
rootpw --iscrypted $default_password_crypted
#rootpw --iscrypted $1$DLTd6xbX$UOYR/gXuVkD2rxWtI4y/l/

# Network information
$SNIPPET('network_config')
#network  --bootproto=dhcp --device=eth0 --onboot=on

# System authorization information
auth  --useshadow  --passalgo=sha512

# Firewall configuration
firewall --disabled

# SELinux configuration
selinux --disabled

# Reboot after installation
reboot

# System bootloader configuration
bootloader --location=mbr

# Clear the Master Boot Record
zerombr

# Partition clearing information
clearpart --all --initlabel 

# Disk partitioning information
part /boot --fstype  ext4 --size 1024 --ondisk sda
#part swap --size 16384 --ondisk sda
part swap --size 2048 --ondisk sda
part / --fstype ext4 --size 1 --grow --ondisk sda


%pre
$SNIPPET('log_ks_pre')
$SNIPPET('kickstart_start')
$SNIPPET('pre_install_network_config')
# Enable installation monitoring
$SNIPPET('pre_anamon')
%end

%packages
@base
@core
@fonts
@chinese-support
@performance tools

%post
$yum_config_stanza
mkdir -p /app/scripts
mkdir -p /data/
wget -O /app/scripts/centos6_optimiz.sh http://192.168.0.232/centos6_optimiz.sh
chmod +x /app/scripts/centos6_optimiz.sh && /bin/sh /app/scripts/centos6_optimiz.sh
%end

0 个回复

您需要登录后才可以回帖 登录 | 加入黑马