先将ks.cfg文件上传到能够用http或者ftp能够访问web或ftp服务器上。
安装centos6.2步骤linux
进入安装界面,按Esc键进入boot。web
如图所示,输入以下内容:
centos
开始自动安装了,截图以下:
服务器
安装完后根据你的配置定义是否自动重启
网络
安装之后查看系统网络、ip地址等。app
详细ks.cfg配置以下,此处仅做简单配置,请根据我的状况配置你的ks.cfg。ssh
- # 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