安装完后根据你的配置定义是否自动重启

安装以后查看系统网络、ip地址等。

详细ks.cfg配置如下,此处仅作简单配置,请根据个人情况配置你的ks.cfg。
# Kickstart file automatically generated by anaconda.
#version=DEVEL
#安装
install
#选择安装方式cdrom
cdrom
#选择语言
lang en_US.UTF-8
#选择键盘类型
keyboard us
#设置你的ip地址和hostname设置后一般可以访问了。#号部分为如果你有几块网卡时,添加类似network配置即可。
network --onboot yes --device eth0 --bootproto static --ip 192.168.1.145 --netmask 255.255.255.0 --gateway 192.168.1.1 --noipv6 --nameserver 192.168.1.1 --hostname winds
#network --onboot yes --device eth1 --bootproto static --ip 192.168.1.146 --netmask 255.255.255.0 --gateway 192.168.1.1 --noipv6 --nameserver 192.168.1.1 --hostname winds
#设置root用户的密码(此处为123456)
rootpw --plaintext 123456
#对外开放防火墙程序ssh。
firewall --service=ssh
#为系统设置验证选项.这和在安装后运行的authconfig命令相似..
authconfig --enableshadow --passalgo=sha512
# SELinux configuration 禁用selinux
selinux --disabled
#时区,亚洲上海
timezone Asia/Shanghai
bootloader --location=mbr --driveorder=sda --append=" rhgb crashkernel=auto quiet"
#文本模式安装时需要对初始化磁盘。使用--initlabel可初始化磁盘。
#需要注意的是,如果用此ks.cfg安装CentOS6.3时,需要自己再点一次初始化磁盘空间。
clearpart --initlabel --all --drives=sda
#设置分区,此处将剩余空间分配给/目录,具体如何分区请按照个人详细情况划分。
part /boot --fstype=ext4 --size=512
part / --fstype="ext4" --grow --size=1
part swap --size=1024
#最小化安装
%packages --nobase
@core
%end
#安装完成后自动重启。
reboot
更多CentOS相关信息见CentOS 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=14
Linux公社【http://www.linuxidc.com】是专业的Linux系统门户网站,实时发布最新Linux资讯,包括Linux、Ubuntu、Fedora、RedHat、红旗Linux、Linux教程、Linux认证、SUSE Linux、Android、Oracle、Hadoop、CentOS等技术。
