Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed under the Java Community Process. Before we can start installing Tomcat itself, you must first need to install Java.
You can either install tomcat by downloading the source from here or you can easily use apt-get APT package handing utility to install it for you. you should open up a terminal and enter following commands to install tomcat 6.
By executing these apt-get commands first you will update packages available in the repositories. From the second apt-get command you will install the below packages.
Now lets see how to finalize the installation and configure the tomcat6 to work for your requirements.
Below shows how to start, restart, stop and get the server status.
Start tomcat server
Restart tomcat server
Stop tomcat server
Get tomcat server status
Now after installing type the restart command to make sure tomcat6 is running on your machine. By default tomcat runs in the localhost (which is your machine) on port 8080. To test the tomcat6 server and view the welcome page, open up a browser and type http://localhost:8080 .
If the tomcat is correctly installed and running it will display the "It works!" page. There you will see tomcat6-examples click on the link (http://localhost:8080/examples/ ) to see the default tomcat examples and their source.
Now lets see how to admin the tomcat from the web interface. To do this first you need to create a admin user in the tomcat. to create a admin user open up the /etc/tomcat6/tomcat-user.xml with the following command.
There find the <tomcat-users> tag. Inside <tomcat-users> </tomcat-users>
tags add the below code.
As for this configuration username and password both will be "admin".
Now you can access the admin page from http://localhost:8080/manager/html. There you can manage your web apps, deploy new web apps, see server configurations and the server status.
For configuration of the server you need to edit the /etc/tomcat6/server.xml file.
Hope you got some thing from this tutorial.
enjoy!!!!!
:)
You can either install tomcat by downloading the source from here or you can easily use apt-get APT package handing utility to install it for you. you should open up a terminal and enter following commands to install tomcat 6.
sudo apt-get update
sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
By executing these apt-get commands first you will update packages available in the repositories. From the second apt-get command you will install the below packages.
- tomcat6 : Servlet and JSP engine
- tomcat6-admin : Admin web applications
- tomcat6-common : Common files
- tomcat6-user : Tools to create user instances
- tomcat6-docs : Example web applications
- tomcat6-examples : Example web applications
Now lets see how to finalize the installation and configure the tomcat6 to work for your requirements.
Below shows how to start, restart, stop and get the server status.
Start tomcat server
sudo service tomcat6 start
Restart tomcat server
sudo service tomcat6 restart
Stop tomcat server
sudo service tomcat6 stop
Get tomcat server status
sudo service tomcat6 status
Now after installing type the restart command to make sure tomcat6 is running on your machine. By default tomcat runs in the localhost (which is your machine) on port 8080. To test the tomcat6 server and view the welcome page, open up a browser and type http://localhost:8080 .
If the tomcat is correctly installed and running it will display the "It works!" page. There you will see tomcat6-examples click on the link (http://localhost:8080/examples/ ) to see the default tomcat examples and their source.
Now lets see how to admin the tomcat from the web interface. To do this first you need to create a admin user in the tomcat. to create a admin user open up the /etc/tomcat6/tomcat-user.xml with the following command.
sudo gedit /etc/tomcat6/tomcat-users.xml
There find the <tomcat-users> tag. Inside <tomcat-users> </tomcat-users>
tags add the below code.
<role rolename="manager"/>
<role rolename="admin"/>
<user name="admin" password="admin" roles="manager,admin"/>
<role rolename="admin"/>
<user name="admin" password="admin" roles="manager,admin"/>
As for this configuration username and password both will be "admin".
Now you can access the admin page from http://localhost:8080/manager/html. There you can manage your web apps, deploy new web apps, see server configurations and the server status.
For configuration of the server you need to edit the /etc/tomcat6/server.xml file.
Hope you got some thing from this tutorial.
enjoy!!!!!
:)