码迷,mamicode.com
首页 > 系统相关 > 详细

Cobbler6.4 linux系统自动化安装脚本

时间:2016-06-24 13:01:42      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:cobbler之linux

auth  --useshadow  --enablemd5

# System bootloader configuration

bootloader --location=mbr

# Partition clearing information

clearpart --all --initlabel

# Use text mode install

text

# Firewall configuration

firewall --disabled

# Run the Setup Agent on first boot

firstboot --disable

# System keyboard

keyboard us

# System language

lang en_US

# Use network installation

url --url=$tree

# If any cobbler repo definitions were referenced in the kickstart profile, include them here.

$yum_repo_stanza

# Network information

network --onboot yes --device em1 --bootproto dhcp --noipv6

# Reboot after installation

reboot


#Root password

rootpw password

# SELinux configuration

selinux --disabled

# Do not configure the X Window System

skipx

# System timezone

timezone Asia/Shanghai

# Install OS instead of upgrade

install

# Clear the Master Boot Record

zerombr

# Allow anaconda to partition the system as needed



part /boot --fstype ext4 --size=200

part / --fstype ext4 --size=10000 --grow

part swap --size=16000




%pre

$SNIPPET(‘log_ks_pre‘)                                                                                            

$SNIPPET(‘kickstart_start‘)                                                                                       

$SNIPPET(‘pre_install_network_config‘)                                                                            

# Enable installation monitoring                                                                                  

$SNIPPET(‘pre_anamon‘)


%packages

$SNIPPET(‘func_install_if_enabled‘)  

@additional-devel

@base

@chinese-support

@core

@development

net-snmp

dstat

iotop

pcre-devel 

libcap-devel 

libgcrypt-devel 

e2fsprogs-devel 

fuse-devel

cmake

imake

lrzsz


%post

$SNIPPET(‘log_ks_post‘)                                                                                           

# Start yum configuration                                                                                         

$yum_config_stanza                                                                                                

# End yum configuration                                                                                           

$SNIPPET(‘post_install_kernel_options‘)                                                                           

$SNIPPET(‘post_install_network_config‘)                                                                           

$SNIPPET(‘func_register_if_enabled‘)                                                                              

$SNIPPET(‘download_config_files‘) 


echo "nameserver 202.106.0.20" >> /etc/resolv.conf

echo "nameserver 8.8.8.8" >> /etc/resolv.conf

chkconfig --level 345 ip6tables off

chkconfig --level 345 lvm2-lvmetad off

chkconfig --level 345 lvm2-monitor off

chkconfig --level 345 nfs off

chkconfig --level 345 nfslock off

chkconfig --level 345 NetworkManager off

chkconfig --level 345 acpid off 

chkconfig --level 345 anacron off 

chkconfig --level 345 apmd off 

chkconfig --level 345 arptables_jf off 

chkconfig --level 345 atd off 

chkconfig --level 345 autofs off 

chkconfig --level 345 bluetooth off 

chkconfig --level 345 cpuspeed off 

chkconfig --level 345 cups off 

chkconfig --level 345 cups-config-daemon off 

chkconfig --level 345 firstboot off 

chkconfig --level 345 gpm off 

chkconfig --level 345 isdn off 

chkconfig --level 345 mdmonitor off 

chkconfig --level 345 pcmcia off 

chkconfig --level 345 rawdevices off 

chkconfig --level 345 readahead off 

chkconfig --level 345 readahead_early off 

chkconfig --level 345 rhnsd off 

chkconfig --level 345 rpcgssd off 

chkconfig --level 345 rpcidmapd off 

chkconfig --level 345 rpcsvcgssd off 

chkconfig --level 345 xfs off 

cd /tmp

本文出自 “让我men共同成长” 博客,请务必保留此出处http://wujingfeng.blog.51cto.com/5725921/1792485

Cobbler6.4 linux系统自动化安装脚本

标签:cobbler之linux

原文地址:http://wujingfeng.blog.51cto.com/5725921/1792485

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!