Professional Documents
Culture Documents
Home Continuing with the Java tutorials, now is the turn to cover Apache Tomcat. It is a well known Web Container for Java applications working in Web environment. This tutorial is only for installation purposes in Linux. I am using the latest release available for each software while I am writing this tutorial. These are: Fedora Core release 17.You can get it on Get Fedora. Oracles Java JDK release 7 update 04. You can get it on Java 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 Linux Fedora Core 17. So once you have installed Java in Fedora Core, proceed to return here.
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 apachetomcat-7.0.27.tar.gz file. Below an image for a better understanding.
Figure 02: Downloading the apache-tomcat-7.0.27.tar.gz file Note: is always wise do a checksum for any installer you got it. I am not going to cover this, I consider it out of the scope for this tutorial. I just downloaded the apache-tomcat-7.0.27.tar.gz file into the Desktop directory.
Listing 01: Terminal 01 Knowing the current location within a terminal My username is section1. Then we can now create the path directory. In the current terminal 01 execute the command mkdir -p whiteroom/apache/tomcat.
[section1@localhost ~]$ mkdir -p whiteroom/apache/tomcat [section1@localhost ~]$
Listing 02: Terminal 01 Creating the path directory whiteroom/apache/tomcat Below the new directory created after of the command execution.
Figure 05: The path directory whiteroom/apache/tomcat with the Tomcat installer
Listing 03: Terminal 01 Moving to the path directory whiteroom/apache/tomcat You can know our new location executing again the command pwd in the terminal 01.
[section1@localhost tomcat]$ pwd /home/section1/whiteroom/apache/tomcat [section1@localhost tomcat]$
Listing 05: Terminal 01 Unpacking the .tar.gz file The three dots () represent a long output when you execute the command indicated. After of the execution of the command a 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-tomcat7.0.27.tar.gz file
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 respective explanation when be appropriate. The directory of our interest right now is the bin directory.
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
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 Browser and write in the URL address http://localhost:8080. If all is correct you must see the follow image.
Figure 09: Checking if Tomcat server is started through the URL address http://localhost:8080
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!