[centos] 无人职守安装ks.cfg配置文件

[1] 实际工作中安装服务器时 采用 文本安装方式

[2]文本安装方式和图形安装方式的区别

1> 安装的包不同

3>文本安装为最小化安装 服务器一般为最小安装 节省资源 减小安全隐患

4>图形界面安装进度慢一点

5>装上图形界面会增加服务器隐患 更容易被攻击

[3] ks.cfg文件中的安装部分

图形安装ks.cfg

install

text

url --url=ftp://192.168.68.254/centos

lang en_US.UTF-8

keyboard us

network --device eth0 --bootproto dhcp

rootpw --iscrypted $1$JNve6BUI$Ivm.MDR3QnxIn8yeZQD0h0

firewall --disabled

authconfig --enableshadow --enablemd5

selinux --disabled

timezone --utc Asia/Shanghai

bootloader --location=mbr --driveorder=sda --append="rhgb crashkernel=auto 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 --initlabel

part /boot --fstype ext3 --size=100 --ondisk=sda

part swap --size=256 --ondisk=sda

part / --fstype ext3 --size=1 --grow --asprimary
#volgroup VolGroup00 --pesize=32768 pv.2

#logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=1024 --grow --maxsize=2048

#logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow

%packages --nobase
@core

%post --interpreter=/bin/bash

rm -rf /etc/yum.repos.d/*

echo '[centos6]

name=centos6

baseurl=ftp://192.168.68.254/centos

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6' > /etc/yum.repos.d/centos6.repo

yum groupinstall "X Window System" -y
yum groupinstall "Desktop" -y
yum groupinstall "Chinese Support" -y

%end




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值