> Could you please tell me the steps? Env
> Red Hat 7.1
> JDK 1.3.1.02
> Tomcat 4.01
>
> I have tried to use mod_webapp.so and seem to have no
> luck!
>
> Thanks in advance!
I wrote a script that builds the following:
Apache 1.3.22
including:
mod_ssl
Tomcat 4.0.1
IBM JDK 1.3.1
I apologize in advance for the length of this posting (I wasn't sure what to
delete
without causing an error in the dependencies).
I don't know how well this will apply to your configuration. I would
definitely NOT run the script as-is on a system - it may
blow up some things that would make you very unhappy. It basically
has the steps to create from a fresh Redhat 7.1 install a working
system with Apache (including SSL), Tomcat, and a few other things
you probably don't want or need. This is definitely a work in progress,
so there may be some MAJOR screwups in there for most (maybe all)
installations.
You will have to inspect the configuration flags and packages and change
to suit your needs. The packages are mostly the source packages, which
I compile and install.
build_all.sh:
#!/bin/sh
##############################
# setup the environment
BLD_ROOT=/usr/local
DL_HOME=/root/apache_build
##############################
# make sure we want to do this first
echo "****************************************"
echo "* !!!WARNING!!! *"
echo "****************************************"
echo "This is a destructive procedure - only run this if"
echo "you know what you are doing and everything is properly"
echo "backed up!"
echo -n "Do you wish to proceed? (y/n): "
read REPLY
if [ \( $REPLY = 'y' \) -o \( $REPLY = 'Y' \) ] && [ ! -z $REPLY ]; then
echo -n "Are you sure? Spell it out \"yes\" (case sensitive): "
read REPLY2
if [ ! $REPLY2 = 'yes' ] || [ -z $REPLY2 ]; then
exit
fi
else
exit
fi
##############################
# create directory for a local copy of the files
echo -n 'Do you wish to reload from CD? ' >&2
read REPLY
if [ $REPLY = 'y' ] || [ $REPLY = 'Y' ]; then
if [ -d ${DL_HOME} ]; then
rm -rf ${DL_HOME}
fi
echo "Mounting/unmounting CD, this may take a while..."
mkdir ${DL_HOME}
umount /mnt/cdrom
mount /mnt/cdrom
cp -v -R /mnt/cdrom/* ${DL_HOME}
umount /mnt/cdrom
fi
##############################
# start the real install
##############################
rpm -Uhv ${DL_HOME}/IBMJava2-SDK-1.3-10.0.i386.rpm
##############################
# ant
echo "Setting up ant"
cd ${BLD_ROOT}
if [ -d jakarta-ant-1.4 ]; then
rm -rf jakarta-ant-1.4
fi
if [ -f jakarta-ant-1.4-src.tar.gz ]; then
rm -f jakarta-ant-1.4-src.tar.gz
fi
cp -v ${DL_HOME}/jakarta-ant-1.4-src.tar.gz ${BLD_ROOT}
tar xvfz jakarta-ant-1.4-src.tar.gz
cd jakarta-ant-1.4
./build.sh
cp -R dist ${BLD_ROOT}/ant
##############################
# jaxp
echo "Setting up jaxp"
cd ${BLD_ROOT}
if [ -d jaxp-1.1 ]; then
rm -rf jaxp-1.1
fi
if [ -f jaxp-1_1.zip ]; then
rm -f jaxp-1_1.zip
fi
cp -v ${DL_HOME}/jaxp-1_1.zip ${BLD_ROOT}
unzip jaxp-1_1.zip
cp -v jaxp-1.1/*.jar ant/lib
##############################
# servlet.jar
echo "Setting up servlet.jar"
cd ${BLD_ROOT}
if [ -d jakarta-servletapi-4 ]; then
rm -rf jakarta-servletapi-4
fi
if [ -f jakarta-servletapi-4-src-20011227.tar.gz ]; then
rm -f jakarta-servletapi-4-src-20011227.tar.gz
fi
cp -v ${DL_HOME}/jakarta-servletapi-4-src-20011227.tar.gz ${BLD_ROOT}
tar xvfz jakarta-servletapi-4-src-20011227.tar.gz
cd jakarta-servletapi-4
ant clean
ant dist
##############################
# jaf
echo "Setting up jaf"
cd ${BLD_ROOT}
if [ -d jaf-1.0.1 ]; then
rm -rf jaf-1.0.1
fi
if [ -f jaf1_0_1.zip ]; then
rm -f jaf1_0_1.zip
fi
cp -v ${DL_HOME}/jaf1_0_1.zip ${BLD_ROOT}
unzip jaf1_0_1.zip
##############################
# javamail
echo "Setting up javamail"
cd ${BLD_ROOT}
if [ -d javamail-1.2 ]; then
rm -rf javamail-1.2
fi
if [ -f javamail-1_2.zip ]; then
rm -f javamail-1_2.zip
fi
cp -v ${DL_HOME}/javamail-1_2.zip ${BLD_ROOT}
unzip javamail-1_2.zip
##############################
# jdbc
echo "Setting up jdbc"
cd ${BLD_ROOT}
if [ -d jdbc2_0-stdext ]; then
rm -rf jdbc2_0-stdext
fi
mkdir ${BLD_ROOT}/jdbc2_0-stdext
cp -v ${DL_HOME}/jdbc2_0-stdext.jar ${BLD_ROOT}/jdbc2_0-stdext
##############################
# jmx
echo "Setting up jmx"
if [ -d jmx-1_0_1-ri_bin ]; then
rm -rf jmx-1_0_1-ri_bin
fi
cp -v ${DL_HOME}/jmx-1_0-ri_bin.zip ${BLD_ROOT}
unzip jmx-1_0-ri_bin.zip
##############################
# jndi
echo "Setting up jndi"
if [ -d jndi1_2_1 ]; then
rm -rf jndi1_2_1
fi
mkdir ${BLD_ROOT}/jndi1_2_1
cp -v ${DL_HOME}/jndi1_2_1.zip ${BLD_ROOT}/jndi1_2_1
cd ${BLD_ROOT}/jndi1_2_1
unzip jndi1_2_1.zip
##############################
# jsse
echo "Setting up jsse"
cd ${BLD_ROOT}
if [ -d jsse1.0.2 ]; then
rm -rf jsse1.0.2
fi
if [ -f jsse-1_0_2-do.zip ]; then
rm -rf jsse-1_0_2-do.zip
fi
cp -v ${DL_HOME}/jsse-1_0_2-do.zip ${BLD_ROOT}
unzip jsse-1_0_2-do.zip
##############################
# regexp
echo "Setting up regexp"
cd ${BLD_ROOT}
if [ -d jakarta-regexp-1.2 ]; then
rm -rf jakarta-regexp-1.2
fi
if [ -f jakarta-regexp-1.2.tar.gz ]; then
rm -f jakarta-regexp-1.2.tar.gz
fi
cp ${DL_HOME}/jakarta-regexp-1.2.tar.gz ${BLD_ROOT}
tar xvfz jakarta-regexp-1.2.tar.gz
##############################
# jta
echo "Setting up jta"
cd ${BLD_ROOT}
if [ -d jta-1_0_1a ]; then
rm -rf jta-1_0_1a
fi
mkdir ${BLD_ROOT}/jta-1_0_1a
cp -v ${DL_HOME}/jta-1_0_1a.zip ${BLD_ROOT}/jta-1_0_1a
cd ${BLD_ROOT}/jta-1_0_1a
unzip jta-1_0_1a.zip
##############################
# junit
echo "Setting up junit"
cd ${BLD_ROOT}
if [ -d junit3.7 ]; then
rm -rf junit3.7
fi
if [ -f junit3.7.zip ]; then
rm -f junit3.7.zip
fi
cp -v ${DL_HOME}/junit3.7.zip ${BLD_ROOT}
unzip junit3.7.zip
##############################
# ldap
echo "Setting up ldap"
cd ${BLD_ROOT}
if [ -d ldap-1_2_3 ]; then
rm -rf ldap-1_2_3
fi
mkdir ${BLD_ROOT}/ldap-1_2_3
cp -v ${DL_HOME}/ldap-1_2_3-bin.zip ${BLD_ROOT}/ldap-1_2_3
cd ${BLD_ROOT}/ldap-1_2_3
unzip ldap-1_2_3-bin.zip
##############################
# mm
echo "Settup up mm"
cd ${BLD_ROOT}
if [ -d mm-1.1.3 ]; then
rm -rf mm-1.1.3
fi
if [ -f mm-1.1.3.tar.gz ]; then
rm -f mm-1.1.3.tar.gz
fi
cp -v ${DL_HOME}/mm-1.1.3.tar.gz ${BLD_ROOT}
tar xvfz mm-1.1.3.tar.gz
cd ${BLD_ROOT}/mm-1.1.3
./configure --disable-shared
make
make test
##############################
# openssl
echo "Setting up openssl"
cd ${BLD_ROOT}
if [ -d openssl-0.9.6b ]; then
rm -rf openssl-0.9.6b
fi
if [ -d ssl ]; then
rm -rf ssl
fi
if [ -f openssl-0.9.6b.tar.gz ]; then
rm -f openssl-0.9.6b.tar.gz
fi
cp -v ${DL_HOME}/openssl-0.9.6b.tar.gz ${BLD_ROOT}
tar xvfz openssl-0.9.6b.tar.gz
cd openssl-0.9.6b
./config
make
make test
make install
##############################
# xalan
echo "Setting up xalan"
cd ${BLD_ROOT}
if [ -d xalan-j_2_2_D6 ]; then
rm -rf xalan-j_2_2_D6
fi
if [ -f xalan-j_2_2_D6.tar.gz ]; then
rm -f xalan-j_2_2_D6.tar.gz
fi
cp -v ${DL_HOME}/xalan-j_2_2_D6.tar.gz ${BLD_ROOT}
tar xvfz xalan-j_2_2_D6.tar.gz
cd xalan-j_2_2_D6
ant clean
ant
cp -v bin/xalan.jar ${BLD_ROOT}/ant/lib
##############################
# Xerces
echo "Setting up xerces"
cd ${BLD_ROOT}
if [ -d xerces-1_4_4 ]; then
rm -rf xerces-1_4_4
fi
if [ -f Xerces-J-src.1.4.4.tar.gz ]; then
rm -f Xerces-J-src.1.4.4.tar.gz
fi
cp -v ${DL_HOME}/Xerces-J-src.1.4.4.tar.gz ${BLD_ROOT}
tar xvfz Xerces-J-src.1.4.4.tar.gz
cd xerces-1_4_4
ant clean
ant jar
cp -v build/xerces.jar ${BLD_ROOT}/ant/lib
##############################
# tyrex
echo "Setting up tyrex"
cd ${BLD_ROOT}
if [ -d tyrex-0.9.7.0 ]; then
rm -rf tyrex-0.9.7.0
fi
if [ -f tyrex-0.9.7.0.tgz ]; then
rm -f tyrex-0.9.7.0.tgz
fi
cp -v ${DL_HOME}/tyrex-0.9.7.0.tgz ${BLD_ROOT}
tar xvfz tyrex-0.9.7.0.tgz
##############################
# apache
echo "Setting up apache"
cd ${BLD_ROOT}
if [ -d apache_1.3.22 ]; then
rm -rf apache_1.3.22
fi
if [ -d apache ]; then
rm -rf apache
fi
if [ -f apache_1.3.22.tar.gz ]; then
rm -rf apache_1.3.22.tar.gz
fi
cp -v ${DL_HOME}/apache_1.3.22.tar.gz ${BLD_ROOT}
tar xvfz apache_1.3.22.tar.gz
##############################
# tomcat
echo "Setting up Tomcat"
cd ${BLD_ROOT}
if [ -d jakarta-tomcat-4.0.1-src ]; then
rm -rf jakart-tomcat-4.0.1-src
fi
if [ -d ${BLD_ROOT}/tomcat ]; then
rm -rf ${BLD_ROOT}/tomcat
fi
if [ -f jakarta-tomcat-4.0.1-src.tar.gz ]; then
rm -f jakarta-tomcat-4.0.1-src.tar.gz
fi
cp -v ${DL_HOME}/jakarta-tomcat-4.0.1-src.tar.gz ${BLD_ROOT}
tar xvfz jakarta-tomcat-4.0.1-src.tar.gz
cd jakarta-tomcat-4.0.1-src
cp -v ${DL_HOME}/build.properties ${BLD_ROOT}/jakarta-tomcat-4.0.1-src
ant clean
ant dist
cp -v -R dist ${BLD_ROOT}/tomcat
echo "******************************"
echo "* Input required *"
echo -n "Input owner of tomcat directory (not root): "
done=false
while [ $done = false ]; do
do=true
read TOMCATUSER
if [ \( -z $TOMCATUSER \) -o \( $TOMCATUSER = "root" \) ] || [ `finger
${TOMCATUSER} | wc -l` -lt 5 ]; then
echo
echo -e "\aYou must enter a valid user name that is not root."
echo "The following are valid users:"
echo "`egrep '[a-z]:[0-9]{3}:' /etc/passwd | awk -F: '/[a-z]/ { print $1
}' -`"
echo -n "Input valid user: "
else
chown -R ${TOMCATUSER}:users ${BLD_ROOT}/tomcat
# put this here because we have the username now
cp ${DL_HOME}/user_exrc /home/${TOMCATUSER}/.exrc
break
fi
done
##############################
# mod_ssl
${DL_HOME}/build_mod_ssl.sh $BLD_ROOT $DL_HOME
##############################
# webapp
echo "Setting up webapp"
cd ${BLD_ROOT}
if [ -d webapp-module-1.0.1-tc401 ]; then
rm -rf webapp-module-1.0.1-tc401
fi
if [ -f webapp-module-1.0.1-tc401-src.tar.gz ]; then
rm -f webapp-module-1.0.1-tc401-src.tar.gz
fi
cp -v ${DL_HOME}/webapp-module-1.0.1-tc401-src.tar.gz ${BLD_ROOT}
tar xvfz webapp-module-1.0.1-tc401-src.tar.gz
cd ${BLD_ROOT}/webapp-module-1.0.1-tc401
./support/buildconf.sh
./configure --with-apxs=/usr/local/apache/bin/apxs
--with-java=/opt/IBMJava2-13 --with-tomcat=/usr/local/tomcat
make
cp -v ${BLD_ROOT}/webapp-module-1.0.1-tc401/apache-1.3/mod_webapp.so
${BLD_ROOT}/apache/libexec
chown ${TOMCATUSER}:root ${BLD_ROOT}/apache/conf/httpd.conf
${BLD_ROOT}/apache/bin/apachectl configtest
********************************************************
end of build_all.sh
********************************************************
********************************************************
beginning of apache_build/build_mod_ssl.sh:
********************************************************
#!/bin/sh
##############################
# setup the environment
BLD_ROOT=$1
DL_HOME=$2
##############################
# mod_ssl
echo "Setting up mod_ssl"
cd ${BLD_ROOT}
if [ -d mod_ssl-2.8.5-1.3.22 ]; then
rm -rf mod_ssl-2.8.5-1.3.22
fi
if [ -f mod_ssl-2.8.5-1.3.22.tar.gz ]; then
rm -f mod_ssl-2.8.5-1.3.22.tar.gz
fi
cp -v ${DL_HOME}/mod_ssl-2.8.5-1.3.22.tar.gz ${BLD_ROOT}
tar xvfz mod_ssl-2.8.5-1.3.22.tar.gz
cd mod_ssl-2.8.5-1.3.22
./configure --with-apache=${BLD_ROOT}/apache_1.3.22
cd ${BLD_ROOT}/apache_1.3.22
SSL_BASE=${BLD_ROOT}/openssl-0.9.6b EAPI_MM=${BLD_ROOT}/mm-1.1.3 ./configure
--enable-module=ssl --prefix=${BLD_ROOT}/apache --enable-shared=ssl
--disable-rule=SSL_COMPAT --enable-rule=SSL_SDBM --enable-module=most
--enable-shared=max
make
make certificate
make install
cd ${BLD_ROOT}/apache/conf
cp -v httpd.conf httpd.conf.orig
cp -v -f ${DL_HOME}/httpd.conf.template .
# get the server IP address
echo "**********************************"
echo "* INPUT REQUIRED *"
echo -n -e "\aInput the server IP address: "
done=false
while [ $done = false ]; do
do=true
read REPLY
if [ -z $REPLY ]; then
echo -n -e "\aYou must enter a valid server IP address: "
else
SVRIP=$REPLY
unset REPLY
break
fi
done
echo "The server IP address is set to $SVRIP."
# get the server name
echo "**********************************"
echo "* INPUT REQUIRED *"
echo -n -e "\aInput the server name: "
done=false
while [ $done = false ]; do
do=true
read REPLY
if [ -z $REPLY ]; then
echo -n -e "\aYou must enter a valid server name: "
else
SVRNAME=$REPLY
unset REPLY
break
fi
done
echo "The server name is set to $SVRNAME."
# get the administrator e-mail
echo "**********************************"
echo "* INPUT REQUIRED *"
echo -n -e "\aInput the administrator's e-mail address: "
while [ $done = false ]; do
do=true
read REPLY
if [ -z $REPLY ]; then
echo -n -e "\aYou must enter a valid e-mail address: "
else
SVRADMIN=$REPLY
unset REPLY
break
fi
done
echo "The admin e-mail is set to $SVRADMIN."
sed -e "s/@ServerIP@/${SVRIP}/g" -e "s/@ServerName@/${SVRNAME}/g" -e
"s/@ServerAdmin@/${SVRADMIN}/g" ./httpd.conf.template > ./httpd.conf
echo "apache build complete"
echo "verify $BLD_ROOT/apache/conf/httpd.conf, then"
echo "run $BLD_ROOT/apache/bin/apachectl start|startssl to test"
********************************************************
end of apache_build/build_mod_ssl.sh
********************************************************
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>