Search This Blog

Sunday, 26 February 2023

Installing Server Software on Windows and Ubuntu

0 comments

Installing Server Software - Apache and Tomcat 

(Experiment 1)

 Experimented On: 01-01-2024 (III IT 'B')

04-01-2024 (III IT 'A')



Steps involved in Installing Server on Windows:

Step 1: Install JDK version 1.5 and above for having the JRE installed on your system using the link given below: 


After installing JDK, check whether Java has been installed properly by typing the command java and javac on the command prompt.

Step 2: Instll XAMPP software stack which includes the installation for Apache, Tomcat, MySQL, PHP and Perl using the link given below: 


After installing XAMPP successfully in your system, open the browser and type the following commands to check whether the server - Apache and Tomcat are running properly through port number 80 and 8080 respectively:

localhost (127.0.0.1) - can be used to access Apache which is running on port number 80

localhost:8080 (127.0.0.1:8080) is the command used for accessing Tomcat which is running on port 8080


Step 3: Install Netbeans using the link given below for having the Integrated Development Environment (IDE) for developing Enterprise Web Application using Java.


Steps to Install Apache Tomcat Server on Ubuntu:

To install Apache Tomcat Server on Ubuntu OS, one must follow the step-by-step instructions given below:

Step 1: Update system repositories

Press “CTRL+ALT+T” to open the terminal of your Ubuntu 22.04 and run the below-given command to update system repositories:

$ sudo apt update

Step 2: Installation of Java

Before jumping into the installation of Apache Tomcat Server, it is essential to have “Java” on your system. For this purpose, execute the following command to install “OpenJDK 11”:

$ sudo apt install openjdk-11-jdk

Then, verify the version of the installed Java:

$ java version

Step 3: Check the availability of Apache Tomcat package

After fulfilling the requirements, check the availability of the Apache Tomcat package in the repository:

$ sudo apt-cache search tomcat

The given output signifies that the “tomcat9” package for download.

Step 4: Install Apache Tomcat Server on Ubuntu 22.04

After finding the required Apache Tomcat package, we will install it on Ubuntu 22.04 with the help of the below-given command:

$ sudo apt install tomcat9 tomcat9-admin

Press “y” to permit the installation for a few minutes.

Step 5: Check ports for Apache Tomcat Server

On Ubuntu 22.04, the Apache Tomcat Server automatically starts working after completing the installation. To validate this operation, you can utilize the “ss” command for displaying the network socket related information:

$ ss -ltn

The default port for the Apache Tomcat server is “8080”

Step 6: Open ports for Apache Tomcat Server

In case if the UFW firewall is activated on your system, then it may cause trouble while connecting external devices. So, to permit the incoming from any type of source to port “8080”, write out the following “ufw” command:

$ sudo ufw allow from any to any port 8080 proto tcp

Step 7: Test working of Apache Tomcat Server

To test its working specify your system loopback address with the number of the opened port for Apache Tomcat Server:

http://127.0.0.1:8080

After installation, Tomcat home page can be found on the local filesystem at: /var/lib/tomcat9/webapps/ROOT/index.html


Here are some links for learning more

https://linuxhint.com/install_apache_tomcat_server_ubuntu_2204/

Installing and Running Tomcat Apache Server

Quick Start Guide for Servlet Programming



Leave a Reply