Performing a Kickstart Installation
Using Red Hat 7.0
Updated June 20, 2001
Created May 29, 2001
This document describes performing a kickstart install of Red Hat 7.0 from an NFS share. The ks.cfg in this example is located on NFS share along with cpq_stuff.sh for installing the Compaq Health Driver, Agents, Survey, and an updated e100 driver.
Basically it took 3 files for me to do a network kickstart installation + Compaq server agents installation:
- syslinux.cfg
- ks.cfg
- cpq_stuff.sh
MK_KS.CFG
SYSLINUX.CFG
KS.CFG
KS.CFG-POST
GRAB.SH
CPQ_STUFF.SH
REFERENCES
Creating a Kickstart Configuration File (ks.cfg)
- Install a system with all the packages as you like
- Make sure the mkkickstart.rpm is installed
- Run mkkickstart and direct the output to a file
mkkickstart >ks.cfg
- Make any necessary modifications to ks.cfg for it to behave how you want. Pay attention to partitioning and LILO installation location.
- Build the /images/bootnet.img floppy and modify syslinux.cfg so that it defaults to the ks label. Also put any ks specific pointers there.
Configuration Files
MK_KS.CFG
SYSLINUX.CFG
KS.CFG
KS.CFG-POST
GRAB.SH
CPQ_STUFF.SH
REFERENCES
SYSLINUX.CFG
- Here is my modified syslinux.cfg from the bootnet floppy
syslinux.cfg (from /images/bootnet.img floppy)
default ks
prompt 1
timeout 10
display boot.msg
F1 boot.msg
F2 general.msg
F3 expert.msg
F4 param.msg
F5 rescue.msg
F7 snake.msg
label linux
kernel vmlinuz
append initrd=initrd.img devfs=nomount
label text
kernel vmlinuz
append initrd=initrd.img text devfs=nomount
label expert
kernel vmlinuz
append expert initrd=initrd.img devfs=nomount
label ks
kernel vmlinuz
append ks=nfs:server:/cpq_stuff/ks.cfg initrd=initrd.img devfs=nomount
MK_KS.CFG
SYSLINUX.CFG
KS.CFG
KS.CFG-POST
GRAB.SH
CPQ_STUFF.SH
REFERENCES
KS.CFG
- I had to make some slight modifications to the ks.cfg file (mostly had to do with partitioning the system how I want it; and where to install LILO to).
- I removed the following line because I am doing a network install so it will already know where the network is.
device ethernet eepro100
I added the following line to let kickstart know where to get CD's 1 & 2 from for the network installation using NFS.
nfs --server server.linuxclinic.org --dir /var/ftp/pub/rh70respin/i386
I added the following lines because kickstart didn't specify how I want the system partitioned.
part /boot --size 60
part / --size 4096
part swap --size 256
I added the following lines because kickstart didn't specify where I want LILO installed.
lilo --linear --location partition
I added the following line because I want the server to reboot immediately after installation without prompting to press a key to reboot.
reboot
Here is my ks.cfg which I had stored on the NFS share of server.linuxclinic.org:/cpq_stuff
server.linuxclinic.org:/cpq_stuff/ks.cfg
lang en_US
network --bootproto dhcp
nfs --server server.linuxclinic.org --dir /var/ftp/pub/rh70respin/i386
keyboard "us"
zerombr yes
clearpart --linux
install
part /boot --size 60
part / --size 4096
part swap --size 256
lilo --linear --location partition
mouse genericps/2 --emulthree
timezone --utc America/Chicago
xconfig --server "Mach64" --monitor "my monitor"
rootpw --iscrypted $1$nztCjd8q$5z0QNVx6Eqp6E0qS6ZQpb.
auth --useshadow
reboot
%packages
glibc
libtermcap
ncurses
ash
audiofile-devel
automake
bind-utils
byacc
cdecl
sed
procps
psmisc
shadow-utils
zlib
cracklib-dicts
pam
console-tools
cpio
ctags
db1-devel
dev86
diffutils
ed
esound
extace
finger
ftp
gcc-objc
gdbm
gdm
ghostscript
glade
gmc
gnome-audio-extra
gnome-games-devel
gnome-media
gnome-pim-devel
gnome-users-guide
gnumeric
gpm-devel
gtk+
readline
gzip
imlib-cfgeditor
inews
isapnptools
kernel
kernelcfg
krb5-libs
libghttp
libgtop
libpng
libstdc++-devel
m4
libungif
links
LPRng
magicdev
MAKEDEV
memprof
mikmod
mkisofs
mouseconfig
ncurses-devel
netpbm-devel
newt
nmh
openssl
openssh-clients
passwd
pidentd
plugger
ppp
pump
pygtk-libglade
pythonlib
rcs
redhat-release
rhn_register
rootfiles
rpm-build
rusers
sash
setserial
slang
smpeg
statserial
switchdesk
tcl
telnet
time
tix
tmpwatch
up2date-gnome
util-linux
wvdial
xchat
XFree86-devel
XFree86-xdm
xmailbox
xscreensaver
ypbind
setup
basesystem
chkconfig
termcap
bash
apmd
info
grep
aspell
audiofile
aumix
autoconf
awesfx
bdflush
binutils
bug-buddy
bzip2
cdda2wav
cdp
cdrecord
mingetty
e2fsprogs
popt
sysklogd
which
modutils
initscripts
XFree86-libs
XFree86-xfs
words
pwdb
glib
SysVinit
compat-libstdc++
control-center
control-panel
cpp
crontabs
cvs
db1
db2
dev
dhcpcd
diffstat
dip
docbook
ee
elm
esound-devel
expect
fetchmail
findutils
flex
freetype
gcc
gcc-g77
gd
gdb
gdbm-devel
gdk-pixbuf-devel
gedit
gftp
ghostscript-fonts
gimp-devel
glib-devel
glibc-devel
gmp
gnome-audio
gnome-core
gnome-games
gnome-libs
gnome-linuxconf
gnome-objc
gnome-pim
urw-fonts
gnome-print
gnome-utils
gnotepad+
gnupg
gpm
gqview
groff-perl
gtk+-devel
gtop
umb-scheme
gv
hdparm
imlib
imlib-devel
indexhtml
ipchains
iputils
isdn-config
kbdconfig
kernel-pcmcia-cs
kernel-utils
kgcc
sh-utils
kudzu
less
libghttp-devel
libglade-devel
libgtop-devel
libjpeg-devel
libpng-devel
libstdc++
libtermcap-devel
libtiff-devel
perl
libtool-libs
libungif-devel
lilo
linuxconf
losetup
lrzsz
lynx
mailcap
make
man
mc
Mesa
metamail
minicom
mkinitrd
mkxauth
mount
mpage
multimedia
mutt
ncompress
net-tools
netpbm
netpbm-progs
netscape-communicator
newt-devel
njamd
ntsysv
openldap
openssh
openssh-askpass-gnome
openssl-devel
ORBit-devel
patch
pciutils-devel
pine
playmidi-X11
pmake
portmap
printtool
pspell
pygnome
pygtk
python
python-xmlrpc
qt
raidtools
rdate
redhat-logos
rep-gtk
rep-gtk-libglade
rhn_register-gnome
rmt
rp-pppoe
rpm
rpm-devel
rsh
rwho
sane
sawfish
sendmail
setuptool
sharutils
slang-devel
slrn
sndconfig
stat
strace
stylesheets
switchdesk-gnome
tar
tclx
tcsh
tetex-fonts
texinfo
timeconfig
tin
tk
tksysv
traceroute
up2date
urlview
utempter
vim-common
whois
Xaw3d
xcdroast
Xconfigurator
XFree86-75dpi-fonts
XFree86-Mach64
XFree86-twm
xinitrc
xloadimage
xmms
xsane
xsri
yp-tools
zlib-devel
filesystem
mktemp
anacron
fileutils
at
authconfig
bc
bison
bzip2-devel
cdparanoia
gawk
logrotate
vixie-cron
textutils
cracklib
db3
chkfontpath
control-center-devel
cproto
cyrus-sasl
desktop-backgrounds
dia
sgml-common
eject
exmh
file
fortune-mod
gcc-c++
gd-devel
gdk-pixbuf
gettext
gimp
kernel-headers
gnome-applets
gnome-core-devel
gnome-libs-devel
gnome-objc-devel
libxml
gnorpm
gphoto
groff
gtk-engines
guile
ImageMagick
indent
iptables
isdn4k-utils
kernel-source
krb5-devel
kudzu-devel
libglade
libjpeg
librep
libtiff
libtool
libxml-devel
linuxconf-devel
ltrace
mailx
man-pages
Mesa-devel
mkbootdisk
modemtool
mpg123
ncftp
netcfg
netscape-common
nfs-utils
openjade
openssh-askpass
ORBit
pciutils
playmidi
pnm2ppa
procmail
pygnome-libglade
python-devel
quota
readline-devel
rep-gtk-gnome
rhs-printfilters
rp3
rpm-python
rxvt
SDL
sgml-tools
slocate
sox
stunnel
talk
tcp_wrappers
tetex-xdvi
timetool
tkinter
trn
usermode
vim-minimal
Xaw3d-devel
XFree86
XFree86-tools
xisdnload
xrn
xxgdb
mkkickstart
%post
MK_KS.CFG
SYSLINUX.CFG
KS.CFG
KS.CFG-POST
GRAB.SH
CPQ_STUFF.SH
REFERENCES
KS.CFG-POST
- I added my own scripts to the %post section of the ks.cfg file so it would install Compaq Health Driver and Agents after installation.
Note: The snmpd.conf may not be configured correctly; and one would want to reconfigure their own snmpd.conf to make sure that their site is secure.
Note: Notice that the following %post section puts a runonce.sh script in place which are instructions for installing the health driver and agents. It also puts in checks so that the system can check for this runonce.sh script. I also modify the boot sector on the bootnet.img floppy so that we can reboot to the hard drive without having to physically pull the bootnet floppy. Finally after the system installs the Health Driver and Agents, and after the resulting reboot, I restore the boot sector to the floppy if it is still in the drive. This can use a little polishing and debugging to make sure everything is going exactly as it should be; however, it does work in its current state.
Here is my %post section which belongs at the end of the ks.cfg file listed above.
%post from ks.cfg
%post
#Lets add some lines to /etc/rc.d/rc.local as follows
cat <<EOF>>/etc/rc.d/rc.local
`echo \#`
`echo \#Note: The following are items added to /etc/rc.d/rc.local`
`echo \# during Kickstart Installation`
`echo \#`
`echo \#Check for the presence of a /runonce.sh script`
`echo \# If it exists, then run it, then remove it.`
if [ -e /runonce.sh ]; then
sh /runonce.sh
sync; sync; sleep 5
rm /runonce.sh
fi
`echo \#`
`echo \#`
`echo \#We need to control the /etc/resolv.conf because`
`echo \# we are not in control of the dhcp servers`
`echo \# on this network. Our /etc/resolv.conf-special`
`echo \# contains entries for linuxclinic.org and points`
`echo \# to our server as the dns server.`
`echo \#`
cp /etc/resolv.conf-special /etc/resolv.conf
`echo \#`
`echo \#Lets modify /etc/issue so that we can easily see`
`echo \# that this system was installed by kickstart.`
`echo \# The date listed is date and time of install.`
`echo \#`
echo "Kickstart Installed System: `date +%Y%m%d-%H%M`" >> /etc/issue
echo >> /etc/issue
`echo \#`
`echo \#Lets show where the last line displayed on boot up ends.`
`echo \# And lets clear off the last 25 lines so they don't`
`echo \# disappear when the login prompt does a clear screen.`
`echo \# This way when we do a shift+PgUp before logging in,`
`echo \# we can see all of the boot messages.`
echo "Last line of startup procedure"
for X in \`seq -s " " 1 25\`; do
echo -e '\n';
done
`echo \#End of modifications to /etc/rc.d/rc.local from Kickstart`
EOF
#Lets Mount the server NFS share to make our automated
# scripts available to us.
mkdir /mnt/nfs
mount 192.168.0.18:/techtour /mnt/nfs
#Lets have /runonce.sh grab the files necessary for
# installation of cpqhealth, agents, survey, e100, ...
# /runonce.sh doesn't exist yet, so we will do
# a plain file copy to create /runonce.sh
#
cp /mnt/nfs/grab.sh /runonce.sh
#
#Now that /runonce.sh is configured to grab all the
# files necessary for installation of Compaq components
# lets add to /runonce.sh to have it install those components.
# Notice that here we "append" to /runonce.sh instead
# of overwriting it.
#
cat /mnt/nfs/cpq_stuff.sh >>/runonce.sh
#Now that we are done with the NFS share,
# lets unmount it.
umount /mnt/nfs
#
#Lets automate this kickstart install even further. If
# there happens to be the Red Hat network boot floppy
# (or any floppy really) in the floppy drive, we will
# overwrite the boot sector with the MBR. This will
# allow the system to boot "through" the floppy "to"
# the hard drive. This gives us a kind of "pass through"
# capability for the boot floppy. Certainly there are
# other ways of performing this same procedure; however,
# you always have to choose only one method. This one
# just happened to be the first one I chose.
#
#Check the floppy drive for a floppy, if it is still in there
# then we will overwrite the boot sector in the next couple
# of sections. For now, just check for existence of floppy:
dd if=/dev/fd0 of=/floppy.mbr bs=512 count=1
RESULT=$?
if [ $? ]; then
#If there is a floppy in the drive, then...
#Add some commands to /runonce.sh to be
# able to execute /runonce-next.sh
#
cat <<-EOF>>/runonce.sh
rm /runonce.sh
mv /runonce-next.sh /runonce.sh
EOF
#Generate the /runonce-next.sh script
# to be able to restore the boot sector
# to the floppy. The way this is currently
# configured, you get one shot at having the
# floppy in the drive; otherwise, you have to
# restore the boot sector to the floppy manually
# if you care about doing that.
#
cat <<-EOF>>/runonce-next.sh
`echo \#!/bin/sh`
if [ -e /floppy.mbr ]; then
dd if=/dev/fd0 of=/tmp/floppy.mbr bs=512 count=1 || break;
dd if=/dev/ida/c0d0 of=/tmp/hdd.mbr bs=512 count=1 || dd if=/dev/sda of=/tmp/hdd.mbr bs=512 count=1
diff /tmp/floppy.mbr /tmp/hdd.mbr
if [ \$? ]; then
dd if=/floppy.mbr of=/dev/fd0 bs=512 count=1
rm /floppy.mbr
fi
rm /tmp/floppy.mbr
rm /tmp/hdd.mbr
fi
EOF
#Now that we have the /runonce-next.sh script in
# place, lets blow away the boot sector of the
# floppy now. This here is what will give us
# this "pass through" feature I was speaking of.
#
dd if=/dev/ida/c0d0 of=/dev/fd0 bs=512 count=1 || dd if=/dev/sda of=/dev/fd0 bs=512 count=1
else
#Else if there was no floppy in the drive, then it is
# possible that an empty /floppy.mbr exists after
# all the above testing. Lets attempt to remove
# that possible blank file.
#
rm /floppy.mbr
fi
#After all the above
# 1. grab cpq files,
# 2. install cpq files,
# 3. possible floppy instructions to handle network boot floppy
#We need to send the reboot command to /runonce.sh
# so that the system will reboot one last time, making sure
# that everything comes up as expected. Also the above
# configuration handles restoring the boot floppy after this
# reboot. Since our script that installs the compaq mgmt stuff
# starts all the cpq stuff correctly, we don't really need this
# last reboot, but thats how I did it for the class and that
# would mean extra changing of how the scripts are positioned.
# The time saved vs time lost in reconfiguring the scripts
# is not big enough to me just yet.
#
cat <<EOF>>/runonce.sh
reboot
EOF
#
#Lets generate our proper /etc/resolv.conf
# Remember, I created this only because
# I am on a network that I do not control
# the dhcp server. I could just as well
# disconnect from the network so I do not
# disturb it, however, I would like to interact
# with that network, so this is the best and easiest
# way I can see to integrate both of them with
# as little fuss as possible.
#
# Note: For the class I was set up as the dhcp and dns server;
# however, now that I am tweaking this up and making it better
# I am on a network that I can't control the dhcp and dns servers
# -- and yes, I'm fresh out of cross-over cables.
#
cat <<EOF>/etc/resolv.conf
search linuxclinic.org
domain linuxclinic.org
nameserver 192.168.0.18
EOF
cp /etc/resolv.conf /etc/resolv.conf-special
MK_KS.CFG
SYSLINUX.CFG
KS.CFG
KS.CFG-POST
GRAB.SH
CPQ_STUFF.SH
REFERENCES
GRAB.SH
I separated the downloading portion of cpq_stuff.sh script into this script called grab.sh. This script, grab.sh, will log into the ftp server and download the files necessary to complete the download.
You will probably need to download the cpqhealth by hand as I don't have a direct link to it on the Compaq ftp site. The link you see in my grab.sh script is where I had created a fake ftp.compaq.com for a class I was giving - I just stored cpqhealth in /pub of my fake ftp site.
#!/bin/sh
mkdir /tmp/compaq
#Lets grab the Compaq Health Driver and Agents from ftp.compaq.com
#health driver
#4 agents
#rib driver
#e100 driver
#Backup current ~/.netrc file if it exists
PREVIOUS_NETRC=NO
if [ -e ~/.netrc ]
then
mv ~/.netrc ~/.netrc.$$
PREVIOUS_NETRC=YES
fi
#Set up some variables
FTP_SERVER=ftp.compaq.com
FTP_DIRECTORY=/pub/softpaq/sp14001-14500
EMAIL_ADDR=MyEmail@MyISP.com
#Create a new ~/.netrc for this download
cat <<EOF>~/.netrc
machine $FTP_SERVER login anonymous password $EMAIL_ADDR
macdef init
bin
hash
!mkdir /tmp/compaq
lcd /tmp/compaq
cd /pub/softpaq/sp14001-14500
get sp14477.tgz
get sp14477.txt
get sp14478.tgz
get sp14478.txt
get sp14479.tgz
get sp14479.txt
get sp14480.tgz
get sp14480.txt
cd /pub/softpaq/sp16001-16500
get sp16250.tgz
get sp16250.txt
get sp16262.tgz
get sp16262.txt
get sp16355.tgz
get sp16355.txt
cd /pub
get cpqhealth-2.0.0-11.Redhat7_0.i386.rpm
quit
default login anonymous password $EMAIL_ADDR
EOF
#Begin the Download
cd /tmp
ftp $FTP_SERVER
#Cleanup after Downloading
if [ $PREVIOUS_NETRC = YES ]
then
mv ~/.netrc.$$ ~/.netrc
unset PREVIOUS_NETRC
else
rm ~/.netrc
unset PREVIOUS_NETRC
fi
#Next lets grab files from the Red Hat 7.0 CD-Rom
#ucd-snmp-4.1.2-8.i386.rpm
#Backup current ~/.netrc file if it exists
PREVIOUS_NETRC=NO
if [ -e ~/.netrc ]
then
mv ~/.netrc ~/.netrc.$$
PREVIOUS_NETRC=YES
fi
#Set up some variables
FTP_SERVER=server.linuxclinic.org
FTP_DIRECTORY=/pub/rh70respin/i386/RedHat/RPMS
EMAIL_ADDR=MyEmail@MyISP.com
#Create a new ~/.netrc for this download
cat <<EOF>~/.netrc
machine $FTP_SERVER login anonymous password $EMAIL_ADDR
macdef init
bin
hash
!mkdir /tmp/compaq
lcd /tmp/compaq
cd $FTP_DIRECTORY
get ucd-snmp-4.1.2-8.i386.rpm
quit
default login anonymous password $EMAIL_ADDR
EOF
#Begin the Download
cd /tmp
ftp $FTP_SERVER
#Cleanup after Downloading
if [ $PREVIOUS_NETRC = YES ]
then
mv ~/.netrc.$$ ~/.netrc
unset PREVIOUS_NETRC
else
rm ~/.netrc
unset PREVIOUS_NETRC
fi
#Now lets grab files from the SRPMS CD-Rom
#ucd-snmp-4.1.2-8.src.rpm
#Backup current ~/.netrc file if it exists
PREVIOUS_NETRC=NO
if [ -e ~/.netrc ]
then
mv ~/.netrc ~/.netrc.$$
PREVIOUS_NETRC=YES
fi
#Set up some variables
FTP_SERVER=server.linuxclinic.org
FTP_DIRECTORY=/pub/rh70respin/SRPMS/SRPMS
EMAIL_ADDR=MyEmail@MyISP.com
#Create a new ~/.netrc for this download
cat <<EOF>~/.netrc
machine $FTP_SERVER login anonymous password $EMAIL_ADDR
macdef init
bin
hash
!mkdir /tmp/compaq
lcd /tmp/compaq
cd $FTP_DIRECTORY
get ucd-snmp-4.1.2-8.src.rpm
quit
default login anonymous password $EMAIL_ADDR
EOF
#Begin the Download
cd /tmp
ftp $FTP_SERVER
#Cleanup after Downloading
if [ $PREVIOUS_NETRC = YES ]
then
mv ~/.netrc.$$ ~/.netrc
unset PREVIOUS_NETRC
else
rm ~/.netrc
unset PREVIOUS_NETRC
fi
MK_KS.CFG
SYSLINUX.CFG
KS.CFG
KS.CFG-POST
GRAB.SH
CPQ_STUFF.SH
REFERENCES
CPQ_STUFF.SH
The following is a script for installing the agents on a Compaq server running RH70.
I do not guarantee that the snmpd.conf file is configured correct; anyway one would want to reconfigure the file themselves to make sure there are no security holes.
server.linuxclinic.org:/cpq_stuff/cpq_stuff.sh
#!/bin/sh
#
#
#cd to the directory containing all the necessary files
if [ -n "$1" ]; then
cd $1
else
cd /tmp/compaq
fi
echo
#check to make sure we have all the things we need:
#Files listed hare are Mandatory files, duplicate
# this section if you need for optional files.
HAVE_ALL_FILES=YES
for X in sp14477.tgz \
sp14478.tgz \
sp14479.tgz \
sp14480.tgz \
sp16250.tgz \
sp16262.tgz \
sp16355.tgz \
cpqhealth-2.0.0-11.Redhat7_0.i386.rpm \
ucd-snmp-4.1.2-8.i386.rpm \
ucd-snmp-4.1.2-8.src.rpm; do
if [ -e $X ]; then
echo $X - Present
else
HAVE_ALL_FILES=NO
echo $X - FAILURE: This file is missing
fi
done
if [ "$HAVE_ALL_FILES" = "NO" ]; then
echo
echo "FAILURE: You must have all files present"
echo " in the current directory. Please"
echo " download files or change to"
echo " directory containing files."
echo " Current directory is "`pwd`
echo "Exiting!"
exit 1
fi
#Stopping Procedure
#put commands here to stop running services (agents, snmpd, cpqhealth, survey)
/etc/rc.d/init.d/cmanic stop
/etc/rc.d/init.d/cmastor stop
/etc/rc.d/init.d/cmasvr stop
/etc/rc.d/init.d/cmafdtn stop
/etc/rc.d/init.d/snmpd stop
/etc/rc.d/init.d/cpqhealth stop
#Removal (uninstallation) Procedure
#put commands here to uninstall these services (agents, snmpd, cpqhealth, survey)
#
#
#clean up snmpd sources in /usr/src/redhat/SOURCES
for X in ucd-snmp-4.1.2 ucd-snmp-4.1.2-rpm40.patch ucd-snmp-4.1.2.tar.gz ucd-snmp.redhat.conf ucd-snmpd.init; do rm -rf /usr/src/redhat/SOURCES/$X; done
#Clean out files left over from possible previous run.
for X in sp14477.tgz \
sp14478.tgz \
sp14479.tgz \
sp14480.tgz \
sp16250.tgz \
sp16262.tgz \
sp16355.tgz; do
rm -rf $X.dir
done
rpm -e survey
rpm -e cmanic
rpm -e cmastor
rpm -e cmasvr
rpm -e cmafdtn
rpm -e ucd-snmp
rpm -e cpqhealth
#Installation Procedure
#Now lets unpack each of the .tgz files
cd /tmp/compaq
for X in *.tgz; do mkdir $X.dir; (cd $X.dir; tar -xzvf ../$X); done
#Install the health driver
cd /tmp/compaq
rpm -ivh cpqhealth-2.0.0-11.Redhat7_0.i386.rpm
#Install e100 driver
cd /tmp/compaq/sp16262.tgz.dir/e100-1.3.19/src/
make
/etc/rc.d/init.d/network stop
rmmod eepro100
insmod e100.o
if [ $? ]; then
cat /etc/modules.conf | sed -e 's/eepro100/e100/' >/tmp/modules.conf
cp /etc/modules.conf /etc/modules.conf.backup.$$
cp /tmp/modules.conf /etc/modules.conf
fi
rmmod e100
make install
/etc/rc.d/init.d/network start
#Install snmpd
echo "Installing snmpd"
cd /tmp/compaq
rpm -ivh ucd-snmp-4.1.2-8.i386.rpm
chkconfig --level 2345 snmpd on
chkconfig --list snmpd
/etc/rc.d/init.d/snmpd start
#Install foundation agents
echo "Now installing foundation agents"
cd /tmp/compaq/sp14477.tgz.dir/
rpm -ivh cmafdtn-5.00-1.i386.rpm
#Add "-z" to the PFLAGS entry in cmahostd
cat /opt/compaq/foundation/etc/cmahostd | sed -e \
's/PFLAGS="-p 15 -s OK"/PFLAGS="-p 15 -s OK -z"/' \
>/tmp/cmahostd.new;
#Backup the old cmahostd
cp /opt/compaq/foundation/etc/cmahostd \
/opt/compaq/foundation/etc/cmahostd.backup.$$;
#put in the modified cmahostd
cat /tmp/cmahostd.new >/opt/compaq/foundation/etc/cmahostd
#Set up /usr/share/snmp/snmpd.conf
COMM_PUBLIC=public
MGMT_CONSOLE=192.168.0.80
cat /opt/compaq/foundation/etc/snmpd.conf.cma | sed -e \
"s/YourLocalWriteCommunityString/$COMM_PUBLIC/" | sed -e \
"s/YourWriteCommunityString/$COMM_PUBLIC/" | sed -e \
"s/ManagementConsoleIPAddress/$MGMT_CONSOLE/" | sed -e \
"s/#rocommunity public/rocommunity public/" | sed -e \
"s/YourDefaultTrapCommString/$COMM_PUBLIC/" | sed -e \
"s/#trapsink/trapsink/" | sed -e \
"s/TrapDestinationIPAddress/$MGMT_CONSOLE/" > /usr/share/snmp/snmpd.conf
#Install snmpd source
cd /tmp/compaq/
rpm -ivh ucd-snmp-4.1.2-8.src.rpm
cd /usr/src/redhat/SOURCES/
tar -xzvf ucd-snmp-4.1.2.tar.gz
patch -p0 <ucd-snmp-4.1.2-rpm40.patch
/opt/compaq/foundation/etc/snmpdbld <<EOF
root
CCA8850
y
EOF
cd /tmp/compaq/sp14478.tgz.dir/
rpm -ivh cmasvr-5.00-1.i386.rpm
#installing cmastor
cd /tmp/compaq/sp14480.tgz.dir
rpm -ivh cmastor-5.00-1.i386.rpm
#installing cmanic
cd /tmp/compaq/sp14479.tgz.dir/
rpm -ivh cmanic.rpm
#sp16250 is for crid
#Installing survey
cd /tmp/compaq/sp16355.tgz.dir
rpm -ivh survey.rpm
#Health is already started, starting agents
/etc/rc.d/init.d/cmafdtn start
/etc/rc.d/init.d/cmasvr start
/etc/rc.d/init.d/cmastor start
/etc/rc.d/init.d/cmanic start
The code to stop and remove the old components in this script definitely is not needed as part of a fresh install; so you should be able to cut that part out if you wish. Also you don't need the part that restarts each of the components at the very end, since we are doing a reboot after they are installed. I created those sections as a possible upgrade script and so I left it in for this kickstart installation demo.
These scripts can be tweaked just a little bit so that you don't need to reboot after the agents are installed. These tweaks would include:
- Removing the reboot at the end of the runonce script
- Merging the floppy restore script to the end of the agents install script
- Make sure the runonce scripts get removed properly
MK_KS.CFG
SYSLINUX.CFG
KS.CFG
KS.CFG-POST
GRAB.SH
CPQ_STUFF.SH
REFERENCES
References
Homepage: http://geocities.datacellar.net/rlcomp_1999