0% found this document useful (0 votes)
2 views6 pages

Unit5 Notes

This document provides an introduction to GIT and its architecture, including installation, remote repositories, branching, and merging in a Linux environment. It also covers database configurations for MariaDB and MongoDB, Linux security using Kali Linux, and hands-on labs for cloud operations with AWS. The content is structured to include practical lab examples for each topic to enhance learning.

Uploaded by

ab9832
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

Unit5 Notes

This document provides an introduction to GIT and its architecture, including installation, remote repositories, branching, and merging in a Linux environment. It also covers database configurations for MariaDB and MongoDB, Linux security using Kali Linux, and hands-on labs for cloud operations with AWS. The content is structured to include practical lab examples for each topic to enhance learning.

Uploaded by

ab9832
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Unit-5 - Introduction to GIT 12Hour Getting Started With GIT and its Architecture- Lab: Installing and

Configuring GIT in RHEL - Remote Repositories- Lab: Exploring GIT Remote Repository-Branching and
Merging- Lab: Learning and Exploring Branches in GIT - Configuring Databases in Linux-Lab: Maria DB
(MySQL) Installation and Configuration in RHEL -Mongo DB-Lab: Mongo DB Installation and Configuration in
RHEL -Understanding Linux Security OS-Lab: Kali Linux Installation on Virtual Machine- Description About
Different Security Tools in Kali Linux-Hands-on Study on NMAP And METASPLOIT-Lab: Gathering
Information Using NMAP - METASPLOIT- Lab: Vulnerability Management Using METASPLOIT-Knowing
Linux as Cloud Workhorse- Amazon Web Service (AWS-Lab: Operating and Managing an Ec2 Instance in AWS
Cloud

Unit-5: Introduction to GIT (12 Hours)

In this unit, you'll learn about GIT and its various aspects in a Linux environment, focusing on remote repositories,
branching, merging, database configurations, and Linux security using tools like NMAP, Metasploit, and Kali
Linux. Additionally, there will be hands-on labs related to cloud operations with AWS.

1. Getting Started with GIT and its Architecture

GIT is a distributed version control system. It allows multiple developers to work on a project without overriding
each other’s changes. GIT's architecture consists of a working directory, staging area, and GIT repository.

 Working Directory: The place where your files are being worked on.
 Staging Area: A middle layer between the working directory and the GIT repository.
 GIT Repository: The .git directory where all version history is stored.

2. Lab: Installing and Configuring GIT in RHEL

To get started with GIT in Red Hat Enterprise Linux (RHEL), you need to install it first and configure your user
information.

Steps to Install GIT in RHEL:

# Install GIT
sudo yum install git

# Configure your user details


git config --global user.name "Your Name"
git config --global user.email "[email protected]"

Verify GIT Installation:

git --version
3. Remote Repositories

A remote repository refers to a version of your project hosted on the internet or network. You can pull from, push
to, or fetch from a remote repository.

Basic Commands for Remote Repositories:

# Clone a remote repository


git clone https://github.com/user/repository.git

# Add a remote repository


git remote add origin https://github.com/user/repository.git

# Push changes to the remote repository


git push origin main

4. Lab: Exploring GIT Remote Repository

Explore remote repositories by cloning an existing GIT repository and pushing your changes.

Example Lab Commands:

# Clone a remote repository


git clone https://github.com/example/repo.git

# Make some changes to a file


echo "Hello, World!" >> hello.txt

# Add and commit the changes


git add hello.txt
git commit -m "Added hello.txt"

# Push changes to the remote repository


git push origin main

5. Branching and Merging

Branches allow you to develop features, fix bugs, or experiment with new ideas in isolation from other branches.
Merging incorporates changes from one branch into another.

Basic Commands for Branching and Merging:

# Create a new branch


git branch feature_branch
# Switch to the new branch
git checkout feature_branch

# Merge feature_branch into the main branch


git checkout main
git merge feature_branch

6. Lab: Learning and Exploring Branches in GIT

In this lab, you'll create, switch, and merge branches in GIT.

Example Lab Commands:

# Create and switch to a new branch


git checkout -b new_feature

# Add a file and commit it


echo "New feature" >> feature.txt
git add feature.txt
git commit -m "Added new feature"

# Switch back to main and merge the new branch


git checkout main
git merge new_feature

7. Configuring Databases in Linux

Linux systems are widely used for hosting databases like MariaDB (MySQL) and MongoDB. In this section, we'll
install and configure these databases in RHEL.

8. Lab: MariaDB (MySQL) Installation and Configuration in RHEL

Steps to Install MariaDB (MySQL):

# Install MariaDB Server


sudo yum install mariadb-server

# Start MariaDB Service


sudo systemctl start mariadb
sudo systemctl enable mariadb

# Secure the MariaDB installation


sudo mysql_secure_installation

Login to MariaDB and Create a Database:


# Login to MariaDB
sudo mysql -u root -p

# Create a database
CREATE DATABASE mydb;

9. MongoDB - Installation and Configuration in RHEL

Steps to Install MongoDB:

# Create a repository file for MongoDB


sudo vi /etc/yum.repos.d/mongodb-org-4.4.repo

# Add the following lines:


[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc

# Install MongoDB
sudo yum install -y mongodb-org

# Start MongoDB
sudo systemctl start mongod
sudo systemctl enable mongod

10. Lab: MongoDB Installation and Configuration in RHEL

Verify Installation and Create Database:

# Verify MongoDB Service


sudo systemctl status mongod

# Login to MongoDB shell


mongo

# Create a new database


use mydb
db.createCollection("mycollection")

11. Understanding Linux Security OS

Linux security is paramount for ensuring that systems are protected against unauthorized access. Kali Linux is a
specialized distribution used for security testing and penetration testing.
12. Lab: Kali Linux Installation on Virtual Machine

Kali Linux can be installed on a virtual machine like VirtualBox or VMware for penetration testing. Download
the Kali Linux ISO from its official website and set it up on a virtual machine.

13. Description of Different Security Tools in Kali Linux

Kali Linux includes numerous tools for security testing:

 NMAP: A network scanning tool to discover hosts and services on a network.


 Metasploit: A framework for testing and exploiting vulnerabilities in systems.

14. Hands-on Study on NMAP and METASPLOIT

Using NMAP:

NMAP is used to discover hosts and services on a network.

# Scan an IP address
nmap 192.168.1.1

# Scan all devices on a network


nmap -sP 192.168.1.0/24

Using Metasploit:

Metasploit is used to test security vulnerabilities. Below is an example of using Metasploit to scan for open ports.

# Start Metasploit Console


msfconsole

# Search for exploits


search apache

# Use an exploit
use exploit/unix/webapp/apache_mod_cgi_bash_env_exec

15. Lab: Gathering Information Using NMAP

In this lab, you'll scan a network using NMAP to gather information about open ports and services.
16. Lab: Vulnerability Management Using METASPLOIT

In this lab, you'll use Metasploit to exploit known vulnerabilities and test system security.

17. Knowing Linux as Cloud Workhorse

Linux is the backbone of most cloud infrastructure. In this section, you'll work with AWS services using Linux.

18. Lab: Operating and Managing an EC2 Instance in AWS Cloud

Launch and manage an EC2 instance using AWS CLI on Linux.

Steps to Launch an EC2 Instance:

# Install AWS CLI


sudo yum install aws-cli

# Configure AWS CLI


aws configure

# Launch an EC2 instance


aws ec2 run-instances --image-id ami-12345678 --instance-type t2.micro --key-name MyKey --
security-groups my-sg

This comprehensive explanation covers GIT, database configurations, security tools, and cloud infrastructure in
Linux, with practical lab examples for each topic. Let me know if you need further elaboration on any specific
section!

You might also like