instalacion tomcat en fedora 17

Upload: realvaradog4831

Post on 14-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Instalacion Tomcat en Fedora 17

    1/6

    How To: Installing Apache Tomcat 7 in Linux Fedora Core 17

    Home

    Continuing with the Java tutorials, now is the turn to coverApache Tomcat. It is a well known WebContainerfor Java applications working in Web environment.

    This tutorial is only for installation purposes in Linux. I am using the latest release available for eachsoftware while I am writing this tutorial. These are:

    Fedora Core release 17.You can get it onGet Fedora.

    Oracles Java JDKrelease 7 update 04.

    You can get it onJava SE Downloads.

    Apache Tomcat release 7.0.27. You can get it on Tomcat 7 Downloads

    Remember that I already wrote a tutorial named How To: Installing Oracles Java JDK 6/7 in LinuxFedora Core 17. So once you have installed Java in Fedora Core, proceed to return here.

    Step 01: Getting Apache Tomcat 7Just go to Tomcat 7 Downloads. Then go below until the section 7.0.27. Of course this release would

    change according if exists a new release available. Below an image to show you where you should be

    located.

    Figure 01: Apache Tomcat Downloading Page Section 7.0.27

    I am going to work with the core installer, therefore within the core sub section do click in the item or

    option tar.gz. Once you have done this, you are going to be able to get or download the apache-

    tomcat-7.0.27.tar.gz file. Below an image for a better understanding.

    https://manueljordan.wordpress.com/http://fedoraproject.org/en/get-fedora-allhttp://fedoraproject.org/en/get-fedora-allhttp://fedoraproject.org/en/get-fedora-allhttp://www.oracle.com/technetwork/java/javase/downloads/index.htmlhttp://www.oracle.com/technetwork/java/javase/downloads/index.htmlhttp://tomcat.apache.org/download-70.cgihttp://manueljordan.wordpress.com/2012/06/11/how-to-installing-oracles-java-jdk-67-in-linux-fedora-core-17/http://manueljordan.wordpress.com/2012/06/11/how-to-installing-oracles-java-jdk-67-in-linux-fedora-core-17/http://tomcat.apache.org/download-70.cgihttp://fedoraproject.org/en/get-fedora-allhttp://www.oracle.com/technetwork/java/javase/downloads/index.htmlhttp://tomcat.apache.org/download-70.cgihttp://manueljordan.wordpress.com/2012/06/11/how-to-installing-oracles-java-jdk-67-in-linux-fedora-core-17/http://manueljordan.wordpress.com/2012/06/11/how-to-installing-oracles-java-jdk-67-in-linux-fedora-core-17/http://tomcat.apache.org/download-70.cgihttps://manueljordan.wordpress.com/
  • 7/27/2019 Instalacion Tomcat en Fedora 17

    2/6

  • 7/27/2019 Instalacion Tomcat en Fedora 17

    3/6

    Listing 02: Terminal 01 Creating the path directory whiteroom/apache/tomcat

    Below the new directory created after of the command execution.

    Figure 04: The path directory whiteroom/apache/tomcat empty

    Step 03: Copying the installer to our customized installation directory

    Proceed to copy (or move if you want it) the Tomcat installer to our path directory

    whiteroom/apache/tomcat. You must see the follow.

    Figure 05: The path directory whiteroom/apache/tomcat with the Tomcat installer

    Step 04: Moving to our customized installation directory

    In the terminal 01 execute the commandcd whiteroom/apache/tomcat

    [section1@localhost ~]$ cd whiteroom/apache/tomcat[section1@localhost tomcat]$

    Listing 03: Terminal 01 Moving to the path directory whiteroom/apache/tomcat

    You can know our new location executing again the commandpwd in the terminal 01.

    [section1@localhost tomcat]$ pwd/home/section1/whiteroom/apache/tomcat[section1@localhost tomcat]$

  • 7/27/2019 Instalacion Tomcat en Fedora 17

    4/6

    Listing 04: Terminal 01 knowing the current location within a terminal

    Step 05: Unpacking the .tar.gz file

    Now is the turn to work around with the .tar.gz file, we only need to unpack it. Therefore again in the

    terminal 01 execute the commandtar -zxvf apache-tomcat-7.0.27.tar.gz

    [section1@localhost tomcat]$ tar -zxvf apache-tomcat-7.0.27.tar.gz...[section1@localhost tomcat]$

    Listing 05: Terminal 01 Unpacking the .tar.gz file

    The three dots () represent a long output when you execute the commandindicated.

    After of the execution of the commanda new directory named apache-tomcat-7.0.27 must appear, like

    shown below.

    Figure 06: the new apache-tomcat-7.0.27 directory created after to unpack the apache-tomcat-

    7.0.27.tar.gz file

    Step 06: Knowing the apache-tomcat-7.0.27 directory (Optional)

    Lets see what directories exists within the apache-tomcat-7.0.27 directory

    Figure 07: the apache-tomcat-7.0.27 directory content

    I am not going to explain each directory right now, in future tutorials, I will do the respectiveexplanation when be appropriate.

    The directory of our interest right now is the bin directory.

    Step 07: Moving to the apache-tomcat-7.0.27s bin directory

    Again in the terminal 01 just execute the commandcd apache-tomcat-7.0.27/bin

  • 7/27/2019 Instalacion Tomcat en Fedora 17

    5/6

    [section1@localhost tomcat]$ cd apache-tomcat-7.0.27/bin[section1@localhost bin]$

    Listing 06: Terminal 01 Moving to the path directory apache-tomcat-7.0.27/bin

    Is always wise be curious, lets see what files we have within the apache-tomcat-7.0.27/bin directory

    Figure 08: the apache-tomcat-7.0.27/bin directory content

    Step 08: Startup the Apache Tomcat Server

    Within the apache-tomcat-7.0.27/bin directory we have a file of our interest to startup the Tomcat

    server. It is the startup.sh file script.

    Warning: Bear in mind it is a tutorial only for installation purposes, I am not including mandatory and

    important configuration settings about the heap size to avoid problems about the performance with

    Apache Tomcat. It will covered in other tutorials.

    Therefore, to startup Tomcat just execute the command(really the script) ./startup.sh within the

    terminal 01[section1@localhost bin]$[section1@localhost bin]$ ./startup.shUsing CATALINA_BASE: /home/section1/whiteroom/apache/tomcat/apache-tomcat-7.0.27Using CATALINA_HOME: /home/section1/whiteroom/apache/tomcat/apache-tomcat-7.0.27Using CATALINA_TMPDIR: /home/section1/whiteroom/apache/tomcat/apache-tomcat-7.0.27/tempUsing JRE_HOME: /home/section1/whiteroom/sun/jdk/jdk1.7.0_04Using CLASSPATH: /home/section1/whiteroom/apache/tomcat/apache-tomcat-7.0.27/bin/bootstrap.jar:/home/section1/whiteroom/apache/tomcat/apache-tomcat-7.0.27/bin/tomcat-juli.jar[section1@localhost bin]$

    Listing 07: Terminal 01 Startup Apache Tomcat Server through the execution of the startup.sh

    file script

    To check if the Tomcat has started successfully, proceed to open your favourite Web Browserand write

    in the URL addresshttp://localhost:8080. If all is correct you must see the follow image.

  • 7/27/2019 Instalacion Tomcat en Fedora 17

    6/6

    Figure 09: Checking if Tomcat server is started through the URL address http://localhost:8080

    Step 09: Shutdown the Apache Tomcat Server

    Again, within the apache-tomcat-7.0.27/bin directory we have a file of our interest to start the Tomcat

    server. It is the shutdown.sh file script.

    Therefore, to shutdown Tomcat just execute the command(really the script) ./shutdown.sh within theterminal 01

    [section1@localhost bin]$[section1@localhost bin]$ ./shutdown.shUsing CATALINA_BASE: /home/section1/whiteroom/apache/tomcat/apache-tomcat-7.0.27Using CATALINA_HOME: /home/section1/whiteroom/apache/tomcat/apache-tomcat-7.0.27Using CATALINA_TMPDIR: /home/section1/whiteroom/apache/tomcat/apache-tomcat-7.0.27/tempUsing JRE_HOME: /home/section1/whiteroom/sun/jdk/jdk1.7.0_04Using CLASSPATH: /home/section1/whiteroom/apache/tomcat/apache-tomcat-7.0.27/bin/bootstrap.jar:/home/section1/whiteroom/apache/tomcat/apache-tomcat-7.0.27/bin/tomcat-juli.jar[section1@localhost bin]$

    Listing 08: Terminal 01 Shutdown Apache Tomcat Server through the execution of the

    shutdown.sh file script

    Final Notes

    Congratulations, now you have learned how install Apache Tomcat 7 into Fedora Core 17.

    In other tutorials, I will explain more about Apache Tomcat 7, be ready!