#! /usr/bin/ksh
clear
### A script to install External tools on Globecom serves.
### Installs RealServer, snmp, xercex, Apache and Jserv according to the
### server type.
###
### One input parameter is received: the server's type - GNS, AS or WS
#######################################################################N.M
# By : Nissim Mimran
# Dt : 07-Jun-2001
####################### installation of apache ##########################
install_Apache() {
echo " Installing Apache ... "
sleep 3
cp our_apache.tar /usr/local
cd /usr/local
tar -xvf our_apache.tar
cd our_apache
./compile-apache.sh
make
make install
echo " Apache installation completed. Press ant key...."
cd $Work_dir
read i
clear
}
####################### installation of apache jserv ####################
install_ApacheJserv() {
echo " Installing Apache and Jserv... "
echo " Apache and Jserv installation completed. Press any key ... "
cd $Work_Dir
read i
clear
}
####################### installation of snmp #############################
install_snmp() {
echo " Installing snmp ... "
sleap 3
cp ucd-snmp-current.tar /usr/local
cd /usr/local
tar xvf ucd-snmp-current.tar
rm ucd-snmp-current.tar
cd ucd-snmp-snapshot
./configure --sysconfdir=/etc --prefix=/usr --with-mib-modules="agentx ucd-snmp/dlmod"
make
make install
echo " snmp installation completed. Press any key ... "
cd $Work_Dir
read i
clear
}
####################### installation of xcerces ##########################
install_xerces() {
echo " Installing xerces ... "
sleep 3
cp Xerces-C-src_1_2_0a.tar /usr/local
cd /usr/local
tar -xvf Xerces-C-src_1_2_0a.tar
rm Xerces-C-src_1_2_0a.tar
cd xerces-c-src_1_2_0
export XERCESCROOT=`pwd`
cd src
chmod +x *figure
./runConfigure -p solaris -x g++ -c gcc
make
make install
cd ../include
cp -r * /usr/include
echo " Dont forget to add variable to cshrc file XERCESCROOT path"
echo " xerces installation completed. Press any key ... "
cd $Work_Dir
read i
clear
}
####################### installation of Real server ######################
install_RealServer() {
echo " Installing RealServer ... "
echo " RealServer installation completed "
}
####################
### Main script ###
####################
Work_Dir= `pwd`
if [[ "$1" = "GNS" || "$1" = "gns" ]]
then
install_Apache
install_xerces
install_snmp
install_RealServer
elif [[ "$1" = "AS" || "$1" = "as" ]]
then
install_snmp
elif [[ "$1" = "WS" || "$1" = "ws" ]]
then
install_ApacheJserv
else
# -- Usage --
echo "Usage: InstallServ.sh Type"
echo " where Type is the server's type one of:"
echo " GNS - Globecom Neighborhood Server"
echo " AS - Application Server"
echo " WS - Web Server"
fi