cobbler之ks文件编辑
kickstart文件的组成部分:
命令段:用于配置系统
软件包:指定要安装的程序包及程序包组
%packages 标识
@Base:使用@指定包组
lftp:直接写程序包名
注意:软件包段每个软件包和包组每行只能写一个
注意:在程序包前加-,不安装相关包
%end :软件包结束
脚本段:
%pre:安装过程开始前的预备脚本
所能执行的操作较小,它是一个首先的环境,因为其是仅有简装版的shell环境
%post:所有的软件完成之后执行的脚本
此时,具有完整意义上的shell环境,但并非所有命令都安装,先确保所有的程序包已经安装
%end :结束
示例文件:
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Use text mode install
text
# Firewall configuration
firewall --disable
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# Use network installation
url --url=$tree
#url --url="http://172.16.65.222/cobbler/ks_mirror/centos6.5-x86-64/" # If any cobbler repo definitions were referenced in the kickstart profile, include them here.
$yum_repo_stanza
# Network information
#network --bootproto=dhcp --device=eth0 --onboot=on
network --bootproto=static --device=eth0 --ip=172.16.65.111 --netmask=255.255.255.0 --gateway=172.16.65.1 --nameserver=8.8.8.8 --hostname=mycentos --onboot=on
# System bootloader configuration
bootloader --location=mbr
# Reboot after installation
reboot #Root password
rootpw --iscrypted $default_password_crypted
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
key --skip
# Installation logging level
logging --level=info
# 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
#autopart %include /tmp/partition.ks %pre
#!/bin/sh
act_mem=`cat /proc/meminfo | grep MemTotal | awk '{printf("%d",$2/1024)}'`
cat >> /tmp/partition.ks << END
clearpart --all
part swap --bytes-per-inode=4096 --fstype="swap" --size=${act_mem}
part /boot --bytes-per-inode=4096 --asprimary --fstype="ext4" --size=200
part / --bytes-per-inode=4096 --fstype="ext4" --grow --size=1
END
%end %packages
@base
@core
@chinese-support
@development
@ruby-runtime
git
ntp
lrzsz
%end %post
ntpdate cn.pool.ntp.org
hwclock --systohc
chkconfig acpid off
chkconfig atd off
chkconfig autofs off
chkconfig bluetooth off
chkconfig cpuspeed off
chkconfig firstboot off
chkconfig gpm off
chkconfig haldaemon off
chkconfig hidd off
chkconfig ip6tables off
chkconfig iptables off
chkconfig isdn off
chkconfig messagebus off
chkconfig nfslock off
chkconfig pcscd off
chkconfig portmap off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig yum-updatesd off
chkconfig sendmail off
#cd /root
#wget http://172.16.65.222/cobbler/ks_mirror/config/autoip.sh
#sh /root/autoip.sh %end
cobbler之ks文件编辑的更多相关文章
- cobbler之ks文件示例
#platform=x86, AMD64, or Intel EM64T #version=DEVEL # Firewall configuration,关闭防火墙 firewall --disabl ...
- cobbler的ks文件带有特殊字符导致错误
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAykAAACWAQMAAADg0FUUAAAAAXNSR0IArs4c6QAAAAZQTFRFq6urAA
- cobbler ks文件解释--转载
cobbler中ks.cfg文件配置详解 许多系统管理员宁愿使用自动化的安装方法来安装红帽企业 Linux.为了满足这种需要,红帽创建了kickstart安装方法.使用kickstart ...
- wpf xaml文件编辑出现中文乱码
突然有一天,发现在xaml文件编辑窗里打汉字出来了乱码...抓狂 结果发现是番茄助手搞得鬼.只能在编辑xaml文件是暂时关闭番茄助手 visual assist
- Linux:多文件编辑
多文件编辑 1.使用vim编辑多个文件 编辑多个文件有两种形式,一种是在进入vim前使用的参数就是多个文件.另一种就是进入vim后再编辑其他的文件. 同时创建两个新文件并编辑 $ vim 1.txt ...
- vim 多文件编辑【超实用】
vim 多文件编辑(偶的linux笔记) http://blog.csdn.net/lcj_cjfykx/article/details/18805721 通过vim打开的每个文件都对应着一个buff ...
- Linux文件编辑之sed命令
文件编辑之sed命令 sed是一种流编辑器,它是文本处理中非常重要的工具,能够完美配合正则表达式使用,功能不同凡响.处理时,把当前处理的行存储在临时缓冲区中,称为模式空间 (pattern space ...
- 怎么编辑PDF文件内容,PDF文件编辑方法
怎样编辑PDF文件内容?这是一个常常困扰我们的问题,工作当中我们经常会收到PDF格式的文件,但有时的文件内容不是我们想要的或者是觉得不合理的需要改掉.但是每次有这样的问题时都没有什么好的解决方法,每次 ...
- PDF文件怎么修改,PDF文件编辑方法
PDF文件是一种独特的文件,在日常办公中已经成为我们使用最广泛的电子文档格式.在使用PDF文件中会遇到PDF文件有错区的时候,再从新制作一个PDF文件会比较麻烦,只能通过工具来对PDF文件进行修改,这 ...
随机推荐
- java 的关键字 native
native native 关键字说明其修饰的方法是一个原生态方法,方法对应的实现不是在当前文件,而是在用其他语言(如C和C++)实现的文件中.Java语言本身不能对操作系统底层进行访问和操作,但是可 ...
- Ubuntu 安装lrzsz工具
rz(上传) sz(下载)) 1. 安装 sudo apt-get install lrzsz 2. rz可覆盖原文件 rz -y
- oracle schema 白话文详解
概述: (一)什么Oracle叫用户(user): A user is a name defined in the database that can connect to and access ob ...
- gdb 调试(查看运行时数据) 四
在使用GDB调试程序时,触发断点后,可以使用print命令(简写为p),或是同义命令inspect来查看当前程序的运行数据.print命令的格式是: print <expr> pri ...
- RabbitMQ-1 Helloword
参考:http://rabbitmq.mr-ping.com/ 介绍 RabbitMQ是一个消息代理.它的工作就是接收和转发消息.你可以把它想像成一个邮局:你把信件放入邮箱,邮递员就会把信件投递到你的 ...
- TMOD
1. • tag/itemlist {{Syntax Error}} Debug info: Unexpected token else Waiting... Debug info: node D:/ ...
- 自绘图片下拉项 combobox listbox
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using Sy ...
- [转]MSSQL 判断临时表是否存在
原文来自:http://www.cnblogs.com/szfhquan/p/4229150.html 方法一: 1 if exists (select * from tempdb.dbo.sysob ...
- 1037 Magic Coupon (25 分)
1037 Magic Coupon (25 分) The magic shop in Mars is offering some magic coupons. Each coupon has an i ...
- 1065 A+B and C (64bit) (20 分)
1065 A+B and C (64bit) (20 分) Given three integers A, B and C in [−2^63,2^63], you are suppose ...