Skip to content

olajide-adedayo/Multi-VM-Vagrant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

🚀 Linux Service Management + Tomcat Setup (Day 37 — DevOps Lab)

📌 Project Overview

This project demonstrates the installation, configuration, and management of a Java-based application server (Apache Tomcat 10) on a Linux environment using systemd. It reflects real-world DevOps practices including service management, manual deployment, and system verification.

🎯 Objectives

  • Install and configure Apache Tomcat using official binaries
  • Manage services using systemctl
  • Deploy Tomcat as a production-like service
  • Verify application accessibility via browser and CLI

🛠️ Technologies Used

  • Vagrant
  • VirtualBox
  • Ubuntu Linux
  • Apache Tomcat 10
  • OpenJDK 11
  • systemd

🚀 Skills Demonstrated

  • Linux service management using systemctl
  • Application server deployment (Apache Tomcat)
  • Systemd service configuration and management
  • Troubleshooting and debugging service failures
  • Network-based service verification (browser & curl)

⚙️ Implementation Steps

1. Environment Setup

Accessed web VM: vagrant ssh web

2. Install Java (OpenJDK 11)

sudo apt update sudo apt install -y openjdk-11-jdk

Verification: java -version javac -version

3. Download and Extract Tomcat

wget https://archive.apache.org/dist/tomcat/tomcat-10/v10.1.28/bin/apache-tomcat-10.1.28.tar.gz tar xzvf apache-tomcat-10.1.28.tar.gz

4. Configure Tomcat Directory and User

sudo mkdir -p /opt/tomcat sudo cp -r apache-tomcat-10.1.28/* /opt/tomcat/ sudo chown -R tomcat:tomcat /opt/tomcat/

5. Configure Tomcat as a systemd Service

sudo nano /etc/systemd/system/tomcat.service

Paste: [Unit] Description=Tomcat After=network.target

[Service] Type=forking

User=tomcat Group=tomcat

WorkingDirectory=/opt/tomcat

Environment=JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 Environment=CATALINA_HOME=/opt/tomcat Environment=CATALINA_BASE=/opt/tomcat

ExecStart=/opt/tomcat/bin/startup.sh ExecStop=/opt/tomcat/bin/shutdown.sh Restart=on-failure

[Install] WantedBy=multi-user.target

6. Start and Enable Tomcat Service

sudo systemctl daemon-reload sudo systemctl start tomcat sudo systemctl enable tomcat sudo systemctl status tomcat

7. Verification

Browser: http://192.168.56.10:8080

CLI: curl http://192.168.56.10:8080

📸 Screenshots

  • Day 37 Screenshot I - Project Directory Setup
  • Day 37 Screenshot II - Tomcat Installation & File Setup
  • Day 37 Screenshot III - Tomcat Service Running (systemctl)
  • Day 37 Screenshot IV - Tomcat Web Access (Browser)
  • Day 37 Screenshot V - Tomcat Verification (curl)

🧠 Key Learnings

  • Managing Linux services using systemctl
  • Deploying applications using official binaries
  • Configuring JAVA_HOME correctly
  • Troubleshooting service failures
  • Verifying services via browser and CLI

💼 Interview Statement

“I installed and configured Apache Tomcat using official binaries, set up a systemd service for process management, and verified application accessibility via both browser and command-line tools.”

✅ Outcome

A fully functional Tomcat application server deployed on a Linux VM, managed as a system service, and accessible via network, demonstrating real-world DevOps deployment practices.

🔗 GitHub Repository

https://github.com/olajide-adedayo/Multi-VM-Vagrant

About

Multi-VM Vagrant Web + DB Setup (Day 36 — DevOps Lab): Setup and manage a multi-VM environment using Vagrant & VirtualBox. Includes web-server & db-server VMs with private network, SSH access, network verification, and professional Git workflow for portfolio and interviews.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors