`
xitong
  • 浏览: 6188018 次
文章分类
社区版块
存档分类
最新评论

[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




分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics