- Download Tomcat 7 tar.gz
- Run the following commands
cd /path/to/downloaded/file
tar xvzf apache-tomcat-7.0.52.tar.gz
sudo mv apache-tomcat-7.0.52/ /usr/share/tomcat7
sudo gedit /usr/share/tomcat7/bin/catalina.sh
- Add following two lines after the first line and close gedit after saving the changes
JAVA_HOME="/usr/lib/jvm/java-6-openjdk-i386"
JRE_HOME="/usr/lib/jvm/java-6-openjdk-i386/jre"
- To integrate with eclipse
cd /usr/share/tomcat7
sudo ln -s /var/lib/tomcat7/conf conf
sudo ln -s /etc/tomcat7/policy.d/03catalina.policy conf/catalina.policy
sudo ln -s /var/log/tomcat7 log
sudo chmod -R 777 /usr/share/tomcat7/conf
- Start the Tomcat server using following command to check if it is working
sudo /usr/share/tomcat7/bin/catalina.sh run
- Stop the server by pressing ctrl+c
- To change the port number, open server.xml in gedit
sudo gedit /usr/share/tomcat7/conf/server.xml
- Change all the occurrences of to
- Verify installation at: http://localhost:8081/
No comments:
Post a Comment