Install Apache Tomcat Linux

Last day I actually wanted to try web framework, but there are some constraints. One obstacle that is not yet installed his WEB SERVER Apache Tomcat which became the basic requirement when it wanted to develop a web-based framework, I finally tried browsing and finally meet, the tutorial is pretty easy to follow

The preparation of the
When you will install apache tomcat, then you won't find it in the repository. So we have to install his manually. Before you install this first make sure that the Java JDK JRE is installed & in your linux operating system. If you haven't yet installed don't worry, I'll tell you how to install him (this way for the Ubuntu Desktop):

Please type the following command in your terminal:
dpkg –get-selections | grep sun-java

If the java is installed on your linux system will then appear the output like this:
sun-java6-bin                                   install
sun-java6-jdk                                   install
sun-java6-jre                                   install

If it doesn't appear anything or description has not been installed, please install
by typing a command like the following on your terminal:
sudo apt-get install sun-java6-jdk

Well, if javanya apache is installed, Download it here: his tomcat

If it please extract apache tomcatnya:
tar xvzf apache-tomcat-6.0.14. tar.gz

And then move to the directory of permanent system of ubuntu, this time I move
the results of the ekstrasinya to the /usr/local/tomcat folder:

sudo mv apache-tomcat-6.0.14 /usr/local/tomcat

Tomcat requires setting the JAVA_HOME variable in. The best way is
to set/edit/add .bashrc file on file. are there in your home folder
nano ~/.bashrc

And tuck the following lines in the file .bashrc file:
export JAVA_HOME=/usr/lib/jvm/java-6-sun

With it's actually Tomcat is ready to run.

Make A Auto Start 
To make a boot tomcat automatically start when the computer, you can add
some of the following script to create the auto-start and auto-shutdown:

create a file in the tomcat init.d :
sudo nano /etc/init.d/tomcat

now write the following script into the file:
# Tomcat auto-start
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/

export JAVA_HOME=/usr/lib/jvm/java-6-sun

case $1 in
        sh /usr/local/tomcat/bin/
        sh /usr/local/tomcat/bin/
        sh /usr/local/tomcat/bin/
        sh /usr/local/tomcat/bin/
exit 0

Then Fox permissions file that:
sudo chmod 755 /etc/init.d/tomcat

The last step by connecting this script file to the startup folder with a link. Please run the two commands below on your linux terminal:
sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat
sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat

Next run tomcat with the following command:
sudo /etc/init.d/tomcat start

Easy enough to follow, up here, you've successfully installed tomcat apche on linux you.

Click here for Comments