第八步:在图形界面运行system-config-kickstart,创建ks.cfg文件
图形界面操作过于简单,网上百度下很多,这里不做截图了.如果你的系统目前没有安装图形界面,可以使用以下命令进行安装
[root@rhel6u3-1 data]# yum -y groupinstall “X Windows System” “GNOME Desktop Enviroment”主要是第二步选择NFS安装,填写NFS服务器IP地址及路径即可.其他根据个人生产环境进行选择即可.
[root@rhel6u3-1 data]# system-config-kickstart [root@rhel6u3-1 data]# cd /var/www/html/ [root@rhel6u3-1 html]# ls ks.cfg生成ks.cfg之后,可以查看里面的内容,如果你是高手,也可以手写ks.cfg文件.
[root@rhel6u3-1 html]# cat ks.cfg #platform=x86, AMD64, or Intel EM64T #version=DEVEL # Firewall configuration firewall --enabled --ssh # Install OS instead of upgrade install # Use NFS installation media nfs --server=192.168.100.101 --dir=/media/cdrom # Root password rootpw --iscrypted $1$kC9vxUwe$l.U7ZGNt9Yjcvt2YHy3J50 # System authorization information auth --useshadow --passalgo=sha512 # Use text mode install text # System keyboard keyboard us # System language lang en_US # SELinux configuration selinux --disabled # Do not configure the X Window System skipx # Installation logging level logging --level=info # Reboot after installation reboot # System timezone timezone --isUtc Asia/Shanghai # Network information network --bootproto=dhcp --device=eth0 --onboot=on # System bootloader configuration bootloader --location=mbr # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel # Disk partitioning information part /boot --asprimary --fstype="ext4" --size=128 part swap --asprimary --fstype="swap" --size=2048 part / --asprimary --fstype="ext4" --size=8000 part /data --asprimary --fstype="ext4" --size=1 %packages @base @chinese-support %end将 ks.cfg文件放到http根目录之后,启动httpd服务.
[root@rhel6u3-1 ~]# /etc/rc.d/init.d/httpd start Starting httpd: [ OK ]为了试验能够顺利进行,请关闭iptables和将selinux设置为disable或者promession
[root@rhel6u3-1 ~]# /etc/rc.d/init.d/iptables stop iptables: Flushing firewall rules: [ OK ] iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Unloading modules: [ OK ] [root@rhel6u3-1 ~]# setenforce 0