I first installed Java jdk
sudo apt-get install sun-java6-jdkThen I downloaded Apache Tomcat from my nearest mirror server
wget http://apache.fis.uniroma2.it/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.tar.gzThen I installed it
tar -xzvf apache-tomcat-6.0.18.tar.gz
sudo mv apache-tomcat-6.0.18 /opt/
sudo ln -s /opt/apache-tomcat-6.0.18/ /opt/tomcat
then I checked it was correctly installed by typing
cd /opt/apache-tomcat-6.0.18/and verifying it's default page (http://192.168.30.100:8080/) in my browser window.
/bin/startup.sh
I then created an initialization script to make Tomcat automatically start
sudo vim /etc/init.d/tomcathere is the initialization file content
#!/bin/shand at last I installed the script file
# Tomcat Init-Script
case $1 in
start)
sh /opt/tomcat/bin/startup.sh
;;
stop)
sh /opt/tomcat/bin/shutdown.sh
;;
restart)
sh /opt/tomcat/bin/shutdown.sh
sh /opt/tomcat/bin/startup.sh
;;
esac
exit 0
sudo chmod +x /etc/init.d/tomcatI eventually verified that everything was correctly starting by typing:
sudo update-rc.d tomcat defaults
sudo /etc/init.d/tomcat startNext time I'll continue, with the original howto thrack,with integration between Tomcat and Apache2 (which is already running in my server)
No comments :
Post a Comment