1. 程式人生 > >kickstart檔案模板

kickstart檔案模板

# Kickstart file automatically generated by anaconda.
#Itnihao OS
#date 2018-09-25
#version=V2.0
install
#text
#skipx
url --url=http://192.168.100.85/installtree/
lang en_US.UTF-8
keyboard us
network --onboot yes --device eth0 --bootproto static --ip 10.220.5.242 --netmask 255.255.255.0 --noipv6
#rootpw --iscrypted $6$adftwr$dfasdffgsafsdfasdfxcvadsf
rootpw 123456
reboot
firewall --disabled      
#firewall --service=ssh --port=80:tcp
authconfig --useshadow --passalgo=sha512
#authconfig --enableshadow --passalgo=sha512
timezone Asia/Shanhai
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto crashkernel=auto rhgb rhgb quit quit"
#bootloader --location=mbr --driveorder=sda --append=" rhgb crashkernel=auto quiet"
selinux --disabled
#selinux --enforcing
# 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 --none
#clearpart --all --initlabel
clearpart --all
zerombr
part /boot --fstype=ext4 --size=200
part pv.008002 --size=40960
volgroup vg0 --pesize=8192 pv.008002
logvol / --fstype=ext4 --name=root --vgname=vg0  --size=10240
logvol swap --name=swap --vgname=vg0 --size=2048
#logvol /usr --fstype=ext4 --name=usr --vgname=vg0  --size=4096
#part /var --fstype=ext4 --size=80000
#part swap --size=5000
#part / --fstype=ext4 --grow --size=200
#cdrom
#repo --name="CentOS" --baseurl=http://10.100.0.120/iso/ --cost=100
#repo --name="CentOS" --baseurl=cdrom:sr0 --cost=100
%packages --nobase
@base
@chinese-support
@console-internet
@core
@debugging
@directory-client
@hardware-monitoring
@java-platform
@large-systems
@network-file-system-client
@performance
@perl-runtime
@server-platform
@server-policy
pax
oddjob
sgpio
device-mapper-persistent-data
samba-winbind
certmonger
pam_krb5
krb5-workstation
perl-DBD-SQLite
#%post --nochroot
#cp /mnt/source/Packages/conf/settings.sh /mnt/sysimage/tmp/
#mv /mnt/sysimage/etc/httpd/conf/httpd.conf /mnt/sysimage/etc/httpd/conf/httpd.conf.back
#mv /mnt/sysimage/etc/snmp/snmpd.conf /mnt/sysimage/etc/snmp/snmpd.conf.back
#cp /mnt/source/Packages/conf/httpd.conf /mnt/sysimage/etc/httpd/conf/httpd.conf
#cp /mnt/source/Packages/conf/snmpd.conf /mnt/sysimage/etc/snmp/snmpd.conf
#cp /mnt/source/Packages/cacti.tar.gz /mnt/sysimage/tmp
%post
echo -e "Author: zxhk\n" >> /etc/issue
sed -i '1,
[email protected]
:[0-9]:initdefault:@id:3:initdefault:@g' /etc/inittab #cat >> /root/.ssh/authorized_keys << EOF #ssh-rsa asdfasdfasdfa #EOF %e