In my vacation last month i was assigned a project. The project was about bug fixing in a web application. So i had to install some of the basic tools - server, jdk and some others. I chose tomcat6 as my server and went on to install. This post is basically for the beginners. So i am going to keep it very simple.
The one simple method available for Ubuntu users is installing through the Synaptic Packet Manager.
You can find this tool at System > Admistration.
Searching for tomcat you will see something like the above screenshot. Just right click on the main tomcat6 and mark for installation. Then click on Apply to install.
To start the server type the following command in the terminal.
sudo service tomcat6 start
Now goto your browser and type http://localhost:8080/. You will see a message like "It Works" if the tomcat is up and running.
The problem i found with this type of installation was finding the server directory. When installing through synaptic the application files are distributed in various folder. If the library files are in /var/lib/tomcat directory config files will be put in /usr folder. This becomes a problem you want to connect tomcat to eclipse. The solution to this is the manual install of tomcat!
First download the tar.gz binary distribution file from http://tomcat.apache.org/. Next follows some simple commands to be executed to setup tomcat.
- Move the tar.gz file to /usr/local/src and extract it. You can either simply right click the file and click on extract or type the following commands in the terminal.
tar xzvf file_name.tar.gz
or
tar xjvf file_name.tar.bz2
2. Now you have to setup the environmental variables. Use the following commands.
cat >> ~/.bashrcexport CATALINA_HOME=/usr/local/src/tomcat6export JAVA_HOME=/usr/lib/jvm/java-6-sunPress ctrl+d to save and thensource ~/.bashrcNow to start/shutdown the server goto the terminal and typesudo $CATALINA_HOME/bin/startup.shsudo $CATALINA_HOME/bin/shutdown.shSo using the manual method of installation you can now have all the files of tomcat in a single directory making things simpler.
0 comments:
Post a Comment