Tomcat 6 and JDK 1.6

Installing Tomcat 6
yum only gives tomcat5. So,

yum remove tomcat5 -y
cd /usr/share
tar xvzf apache-ant-1.8.1-bin.tar.gz
ln -s /usr/share/apache-ant-1.7.1/bin/ant /usr/local/bin

mkdir /usr/local/tomcat
tar xvzf apache-tomcat-6.0.28.tar.gz
mv apache-tomcat-6.0.28/* ./
rm -rf apache-tomcat-6.0.28

Go get /etc/init.d/tomcatd startup script frm ns38 or google around.

chown -R root:tomcat /usr/local/tomcat/
chown -R tomcat:tomcat /usr/local/tomcat/temp/
chown -R tomcat:tomcat /usr/local/tomcat/logs/
chown -R root:root /usr/local/tomcat/bin/

Next, test,

maybe cannot start. Why? make sure this details are acordingly in /etc/init.d/tomcatd

# chkconfig: 345 84 16
# description: Tomcat jakarta JSP server


# Necessary environment variables
export JAVA_HOME=/usr/bin
export JRE=$JAVA_HOME/jre
export ANT_HOME=/usr/share/apache-ant-1.8.1
export CLASSPATH=$JAVA_HOME/lib:$JRE/lib:$CATALINA_HOME/bin/:$CATALINA_HOME/common/lib:.

And make sure work/Catalina is chmod to 755, and tomcat:tomcat chown.. blablabla..

Installing JDK + JRE 1.6

vi ~/.rpmmacros

%_topdir /home//rpmbuild
%_tmppath %{_topdir}/tmp

mkdir /home//rpmbuild
mkdir -p ~/rpmbuild/{SOURCES,SRPMS,SPECS,RPMS,tmp,BUILD}
yum install -y rpm-build gcc gcc-c++ redhat-rpm-config

im using Centos 5.2, so,

yum install jpackage-utils

then, need to get the JDK (in this case JDK 1.6) from Sun Java download or the Sun JDK archive and put it in ~/rpmbuild/SOURCES/ folder.

cd ~/rpmbuild/SOURCES/

Browse the JPackage archive for the proper nosrc.rpm file. At the time of writing it is: java-1.6.0-sun-

cd ~/rpmbuild/
curl -L -O
rpmbuild --rebuild java-1.6.0-sun-

then it will execute for quite some time, just wait, patient, wash hand.. then something like this appear:

rote: /root/rpmbuild/RPMS/x86_64/java-1.6.0-sun-alsa- /root/rpmbuild/RPMS/x86_64/java-1.6.0-sun-jdbc- /bin/sh -e /root/rpmbuild/tmp/rpm-tmp.24651+ umask 022+ cd /root/rpmbuild/BUILD+ cd jdk1.6.0_14+ rm -rf /root/rpmbuild/tmp/java-1.6.0-sun- exit 0Executing(--clean): /bin/sh -e /root/rpmbuild/tmp/rpm-tmp.24651+ umask 022+ cd /root/rpmbuild/BUILD+ rm -rf jdk1.6.0_14+ exit 0

Then means OKie oredi.. so next, we put them in our local yum repository or install them:

yum --nogpgcheck localinstall ~/rpmbuild/RPMS/x86_64/java-1.6.0-sun-

alternatives --config java (to check which is which)
refer here for adding new if not auto :

And check:

[root@nplay-03 rpmbuild]# java -versionjava version "1.6.0_14"Java(TM) SE Runtime Environment (build 1.6.0_14-b08)Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)

Ref :

kudos : hmlee, cllee



Post a Comment

Popular posts from this blog

SAP Backdoors {placeholder Post]

Fiori Apps Keep Calling Internal Hostname / Internal FQDN