标签:iso disable master jpa zone -- mon nis baseurl
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use CDROM installation media
cdrom
# Root password
rootpw --iscrypted $1$IkaF13CI$SKtcb3iDyjucQFb82aU4.0
# System authorization information
auth --useshadow --passalgo=sha512
# Use text mode install
text
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US.UTF-8
# SELinux configuration
selinux --disabled
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone Asia/Shanghai
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --append="selinux=0" --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="ext4" --size=500
part / --fstype="ext4" --size=51200
part /data --fstype="ext4" --size=30720
part /app --fstype="ext4" --size=20480
part swap --fstype="swap" --size=2048
%post
################################
# reset69.sh
################################
# Step1. configure temporary yum repo
mount /dev/sr0 /mnt
rm -f /etc/yum.repos.d/*.repo
cat > /etc/yum.repos.d/base.repo << EOF
[base]
name=CentOS6.9 DVD
baseurl=file:///mnt/
gpgkey=file:///mnt/RPM-GPG-KEY-CentOS-6
EOF
yum clean all
yum repolist
# Step2. install packages
yum install -y vim lrzsz autofs ntp tree
# Step3. configure autofs service (available on startup)
chkconfig autofs on
service autofs start
umount /mnt
# Step4. configure ntpd service (available on startup)
ntpdate 172.20.0.1
cat >> /etc/ntp.conf << EOF
server 172.20.0.1
EOF
chkconfig ntpd on
service ntpd start
# Step5. modefy local yum repo
cat > /etc/yum.repos.d/base.repo << EOF
[base]
name=CentOS6.9 DVD
baseurl=file:///misc/cd/
gpgkey=file:///misc/cd/RPM-GPG-KEY-CentOS-6
EOF
yum clean all
yum repolist
# Step6. configure prompt format
echo "PS1=‘\[\e[1;32m\][\u@\h \W]\\$\[\e[0m\]‘" > /etc/profile.d/env.sh
source /etc/profile.d/env.sh
# Step7. configure localhost name
hname=CentOS69.magedu.com
cat > /etc/sysconfig/network <<EOF
NETWORKING=yes
HOSTNAME=`echo ${hname}`
EOF
cat >> /etc/hosts << EOF
`echo -e "127.0.0.1\t${hname}"`
EOF
# Step8. configure alias
cat >> ~/.bashrc << EOF
alias cdnet="cd /etc/sysconfig/network-scripts/;pwd"
alias vie0="vim /etc/sysconfig/network-scripts/ifcfg-eth0"
alias rn="service network restart;ifconfig eth0|head -n2"
EOF
source ~/.bashrc
# Step9. configure sshd access arguments
sed -r -i ‘s/(GSSAPIAuthentication )yes/\1no/‘ /etc/ssh/sshd_config
sed -i ‘s/#UseDNS yes/UseDNS no/‘ /etc/ssh/sshd_config
service sshd restart
%end
%packages
@base
@core
@debugging
@basic-desktop
@desktop-debugging
@desktop-platform
@development
@directory-client
@fonts
@general-desktop
@graphical-admin-tools
@input-methods
@internet-applications
@internet-browser
@java-platform
@legacy-x
@network-file-system-client
@office-suite
@print-client
@remote-desktop-clients
@server-platform
@server-policy
@workstation-policy
@x11
mtools
pax
python-dmidecode
oddjob
wodim
sgpio
genisoimage
device-mapper-persistent-data
systemtap-client
abrt-gui
jpackage-utils
samba-winbind
certmonger
pam_krb5
krb5-workstation
libXmu
%end
标签:iso disable master jpa zone -- mon nis baseurl
原文地址:https://www.cnblogs.com/GymUManAlvin/p/9125020.html