Kickstart配置文件超详细解析(2)

install text nfs --server=192.168.100.100 --dir=/install #url --url=http://192.168.100.100/centos6.6 bootloader --location=mbr --driveorder=sda --append="crashkernel=auto quiet" lang en_US.UTF-8 keyboard us network --onboot=yes --device=eth0 --bootproto=dhcp --noipv6 rootpw --iscrypted $6$x4u9sIfSQsO7ddk5$/.0Xe6tFBY0uUmFFtyvAeY9YVPtcn8zl21fFNgmAoYtepQHRYDthQ4T1ZE12kDfAT6O3oXfRb7uv214t3Bb3K1 firewall --service=ssh authconfig --enableshadow --passalgo=sha512 selinux --disabled timezone Asia/Shanghai reboot #安装结束后重启 #make partitions zerombr clearpart --all --initlabel part /boot --fstype=ext4 --asprimary --size=250 part / --fstype=ext4 --asprimary --grow --size=2000 part swap --fstype=swap --size=2000 %packages @base @core @debugging @development @dial-up @hardware-monitoring @performance @server-policy @workstation-policy sgpio device-mapper-persistent-data systemtap-client %end %post #结束后做的事 cat >>/etc/yum.repos.d/base.repo<<eof [base] name=sohu baseurl=http://mirrors.sohu.com/centos/$releasever/os/$basearch/ gpgcheck=0 enable=1 [epel] name=epel baseurl=http://mirrors.sohu.com/Fedora-epel/6Server/x86_64/ enable=1 gpgcheck=0 eof sed -i "s/ONBOOT.*$/ONBOOT=yes/" /etc/sysconfig/network-scripts/ifcfg-eth0 #设置网卡为启动 sed -i "s/rhgb //" /boot/grub/grub.conf # 设置启动系统时不使用图形进度条方式 sed -i "s/HOSTNAME=.*$/HOSTNAME=xuexi.longshuai.com/" /etc/sysconfig/network #设置主机名 %end

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/13579.html