In this blog , i will be explaining how to install and run Tomcat application server in one of Linux operating system (I am using CentOS). The following steps apply,no matter which linux version you are using.
- Installing/updating Java Development Kit in the operating system
- Check the version of Java Development Kit by typing the following command in your terminal
- java -version
- If the version is above 1.5 , its well and good, just proceed to the Configure Tomcat section
- If the version is below 1.5, update your Java Development Kit. Follow below steps
- download jdk-6u21-linux-i586-rpm.bin from this link http://www.oracle.com/technetwork/java/javase/downloads/jdk6-jsp-136632.html
- Register/Login to download the operating system specific version.
- Paste the file in /usr/java folder
- Open a Terminal, navigate to the java folder by typing the following command
- cd /usr/java
- Give rights for execution on the .bin file and execute the binary file by typing the following command
- chmod +x jdk-6u21-linux-i586-rpm.bin ./jdk-6u21-linux-i586-rpm.bin
- A license texts will be listed, press down arrow and agree to the license
- Then it will extract all files to a jdk folder in the same directory
- Type the following command to set the JAVA_HOME environment variable
- export JAVA_HOME = /usr/java/jdk1.6.0_21
- Type the following command to verify the environment variable
- echo $JAVA_HOME
- If it reflects the path you gave, you succeeded
- Installing Tomcat on Linux
- Download Tomcat 6.x version in .tar type from the below link
- Copy the downloaded file into the /usr directory and unzip the file.
- Open a Terminal and set the CATALINA_HOME environment variable
- export CATALINA_HOME=/usr/tomcat6.x
- Then type the following command to start the server
- $CATALINA_HOME/bin/startup.sh
- It should have started if all the required .jar files are present in the bin file, especially bootstrap.jar file
- To test whether the Tomcat server has started or not, type the following command
- ping -telnet localhost 8080
- The response should be
- Trying 127.0.0.1
- Connected to localhost.localdomain[127.0.0.1]
- Thats it, type the following url in your browser and check for Tomcat's home page
- http://localhost:8080
- To stop the running server,type the following command in a Terminal
- $CATALINA_HOME/bin/shutdown.sh
- Installing Glassfish on Linux
- Download Glassfish-3 from the below link, prefer downloading the .zip file which requires no configuration
- Copy the downloaded file into the /usr directory and unzip the file.
- Open a Terminal, type the following command after navigating to the extracted glassfish directory
- cd /usr/glassfish
- bin/asadmin start-domain domain1
- To stop the running domain
- bin/asadmin stop-domain domain1
No comments:
Post a Comment