Typical RHEL6 Config File

From DFWLPiki
Revision as of 20:44, 29 December 2016 by Jhorne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
# Kickstart file automatically generated by anaconda.

#%pre
# i used this on a system that had a local boot drive > 2TB, if less than 2TB dont need this
#/usr/sbin/parted -s /dev/sda mklabel gpt
#%end

#version=RHEL6.3
install
text
#url --url http://10.32.3.21/linux/centos/6/6.3/x86_64/os/
nfs --server=10.32.3.21 --dir=/opt/data/linux/centos/6/6.3/x86_64/os
lang en_US.UTF-8
keyboard us
# 9th gen dell uses eth0
# 11th gen dell uses em1
network --bootproto=static --ip=10.32.0.54 --netmask=255.255.255.0 --gateway=10.32.0.1 --nameserver=10.1.1.45 --device=eth0 --hostname d0lpvf054
network --bootproto=static --ip=10.32.10.197 --netmask=255.255.255.0 --device=eth1
rootpw  --iscrypted yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaay
firewall --disabled
authconfig --enableshadow --passalgo=sha512 --enablefingerprint
selinux --disabled
timezone America/Chicago
bootloader --location=mbr --append="crashkernel=auto vga=791 nomodeset"
clearpart --all
zerombr
#Disk partitioning information
part /boot --fstype ext4 --size 500 --asprimary
## Create Logical Volumes
part pv.01 --size=1 --grow --ondisk=vda
#part pv.02 --size=1 --grow --ondisk=sdb
volgroup vg00 pv.01
#volgroup vg01 pv.02
logvol / --vgname=vg00 --size=2048 --name=lv_root
logvol swap --vgname=vg00 --size=2048 --name=lv_swap
logvol /tmp --vgname=vg00 --size=1024 --name=lv_tmp
logvol /usr --vgname=vg00 --size=6144 --name=lv_usr
logvol /var --vgname=vg00 --size=4096 --name=lv_var
logvol /opt --vgname=vg00 --size=2048 --name=lv_opt
logvol /home --vgname=vg00 --size=4096 --name=lv_home
#logvol /opt/mysql --vgname=vg00 --size=16384 --name=lv_mysql
#logvol /opt/postgres --vgname=vg00 --size=16384 --name=lv_postgres
#logvol /opt/dbdump --vgname=vg00 --size=16384 --name=lv_dbdump


#Do not configure XWindows
skipx
#Reboot after installation
reboot

#repo --name="Red Hat Enterprise Linux"  --baseurl=file:///mnt/source/ --cost=100

%packages
@additional-devel
@base
@cifs-file-server
@console-internet
@core
@debugging
@development
@directory-client
@mail-server
@hardware-monitoring
@java-platform
@large-systems
@nfs-file-server
@network-file-system-client
@performance
@perl-runtime
@system-management-snmp
@server-platform
@server-policy
@system-management
procmail
screen
xinetd
glibc.i686
libacl.i686
compat-libstdc++-33.i686
libstdc++.i686
libxml2.i686
libXinerama-devel
xorg-x11-proto-devel
startup-notification-devel
libgnomeui-devel
libbonobo-devel
libXau-devel
libgcrypt-devel
popt-devel
libXrandr-devel
libxslt-devel
libglade2-devel
gnutls-devel
mtools
pax
python-dmidecode
oddjob
sgpio
jpackage-utils
certmonger
pam_krb5
krb5-workstation
nscd
pam_ldap
nss-pam-ldapd
bacula-client
ruby
openwsman-client 
libwsman1
-dovecot
-spamassassin
-mysql-devel
-postgresql-devel

# Post Commands for Production
%post
# Setup resolv.conf for Production
cat << EOF > /etc/resolv.conf
domain yay.me
nameserver 10.1.1.45
nameserver 10.3.1.16
search yay.me
EOF
# setup NTP for Production
cat << EOF > /etc/ntp.conf
restrict default nomodify notrap noquery
restrict 127.0.0.1
restrict 10.0.0.0 mask 255.0.0.0 nomodify notrap
server 0.us.pool.ntp.org
server 1.us.pool.ntp.org
server 2.us.pool.ntp.org
driftfile /var/lib/ntp/drift
broadcastdelay  0.008
EOF
chkconfig ntpd on
ntpdate -v -b 0.us.pool.ntp.org
chkconfig fcoe-target off
chkconfig fcoe off
chkconfig bacula-fd on
chkconfig snmpd on
chkconfig smartd off
chkconfig kudzu off
chkconfig libvirtd off
chkconfig rhn-virtualization-host off
chkconfig xendomains off
chkconfig mdmonitor off
chkconfig xend off
chkconfig rhnsd on
chkconfig avahi-daemon off
chkconfig avahi-dnsconfd off
chkconfig bluetooth off
chkconfig firstboot off
chkconfig isdn off
chkconfig hidd off
chkconfig ip6tables off
chkconfig pcscd off
chkconfig iptables off
chkconfig yum-updatesd on
chkconfig cpuspeed off
# Setup /etc/snmp/snmpd.conf for Production
cat << EOF > /etc/snmp/snmpd.conf
syslocation  "Production"
syscontact  "Jonathan Horne"
rocommunity  yayyyyyy
EOF
sed -i 's/^#compress/compress/' /etc/logrotate.conf
EOF
echo "relayhost = [smtp.production.me]" >> /etc/postfix/main.cf
EOF
echo "%wheel  ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers
EOF
sed -i 's/rhgb quiet//g' /boot/grub/grub.conf
EOF
sed -i 's/^path/#path/' /etc/kdump.conf
echo net 10.32.3.21:/opt/data/crashdump >> /etc/kdump.conf
EOF
%end