About Learning Program
The Apache HTTP Web Service, commonly known as Apache, is an open-source web server software that allows a computer to host websites and web applications. It is one of the most widely used web servers in the world and is known for its robustness, flexibility, and extensive features.
In the context of an enterprise application, imagine your company has a robust web-based application that employees and customers need to access. Apache acts as the intermediary that handles requests from users’ browsers, processes these requests, and serves the appropriate web pages or data back to the users.
You Will Learn About:
- Prerequisite for Apache HTTP Installation
- Apache TOMCAT Installation and configuration
- Integration Of HTTP AND TOMCAT
- Enable Apache Modules which require for url redirection
- Restart Apache HTTP Web Service
- Versions of MySQL
- MySQL Server Installation
- To Integrate Tomcat with MySQL you need MySQL connector
- Create JSP page to test Database connectivity
- Finally, Access the DBTEST page
- Fees: 999/- INR
Chapter Overview
1.1: You need to install following packages in order to install Apache HTTP.
1.2: Create a separate directory to keep downloaded software.
1.3: Perform following steps to download httpd-2.4.6.tar.gz software and install.
1.4: Extract the downloaded tar.gz file
1.5: Navigate into the extracted Apache HTTP Server directory.
1.6: Configure the installation with the specified prefix directory (/opt/apache/).
1.7: Compile the Apache HTTP Server source code
1.8: Install the compiled Apache HTTP Server to the specified directory.
1.9: Restart the Apache HTTP Server using the installed apachectl script.
1.10: Check for active network connections to verify Apache is running.
1.11: Install the compiled Apache HTTP Server to the specified directory.
1.12: Remove the extracted source directory to clean up.
2.1: You need Java to run Apache Tomcat because Tomcat is built using Java. This command installs Java version 1.8 on your Linux system.
2.2: Move to the /softwares directory. Then, download the Apache Tomcat version 9.0.8 from the internet. Think of it like downloading an installer for a software.
2.3: Extract the downloaded Tomcat file into the /opt/ directory. This is like unzipping a file to a specific folder.
2.4: Go to the /opt/ directory and rename the extracted folder from apache-tomcat-9.0.8 to a simpler name, tomcat.
2.5: Add the Tomcat home directory path (/opt/tomcat/) to your environment variables so that your system knows where to find Tomcat.
2.6: Go to the Tomcat bin directory and run the startup.sh script to start the Tomcat server. This script gets Tomcat up and running, ready to serve your applications.
3.1: You need to edit the Apache HTTP server configuration file. The vi command opens the httpd.conf file located in the /opt/apache/conf/ directory and add these lines at the bottom of the httpd.conf file.
4.1: You need to edit the Apache HTTP server configuration file again. The vi command opens the httpd.conf file located in the /opt/apache/conf/ directory.
MySQL is an open-source relational database management system (RDBMS) that uses Structured Query Language (SQL) for accessing and managing databases. It is one of the most popular databases in the world, known for its speed, reliability, and ease of use. MySQL is commonly used in web applications
6.1: MySQL Community Edition
6.2: MySQL Enterprise Edition
6.3: MySQL Cluster
7.1: MySQL needs to run on Rocky Linux 9.
7.2: Navigate to the /softwares directory and download the MySQL package from the specified URL.
7.2: Copy the extracted MySQL directory to /opt and rename it to mysql for easier access..
This command installs the MySQL Connector for Java using the yum package manager. The connector allows Java applications, like those running on Tomcat, to connect to a MySQL database. The specific version being installed is 8.0.30.
Run the startup script to start the Tomcat server again. This will load the new MySQL Connector and any other changes you've made.
Open the dbtest.jsp file located in the examples directory of the Tomcat webapps folder using the vi editor. This file will be used to test the connection to the MySQL database.
This JSP (JavaServer Page) code will try to connect to the MySQL database named ibgapp and display a message indicating whether the connection was successful or not.
Open your web browser and go to the URL http://public_ip/examples/jsp/dbtest.jsp (replace public_ip with your server's actual IP address). This will load the dbtest.jsp page, which will attempt to connect to the MySQL database and display whether the connection was successful or not.
Content for Download Katalon tab
Content for Transcript tab
Content for Review tab