0% found this document useful (0 votes)
20 views9 pages

Unit 4

The document provides a comprehensive guide on various aspects of system software and package management in RHEL, including package installation, network administration, service management, web server configuration, disk management, and version control using Git. It outlines specific commands and steps for tasks such as installing packages, managing daemons, configuring Samba and NFS servers, and using Git for version control. Additionally, it introduces container technology and logical volume management, emphasizing practical steps for effective system administration.

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)
20 views9 pages

Unit 4

The document provides a comprehensive guide on various aspects of system software and package management in RHEL, including package installation, network administration, service management, web server configuration, disk management, and version control using Git. It outlines specific commands and steps for tasks such as installing packages, managing daemons, configuring Samba and NFS servers, and using Git for version control. Additionally, it introduces container technology and logical volume management, emphasizing practical steps for effective system administration.

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/ 9

1.

System Software and Package Management

Explanation:

 Package Management involves handling software packages, including installation, upgrades,


configuration, and removal.
 RHEL uses the yum and dnf package managers to manage software.

Steps:

1. Install a package: sudo yum install package-name or sudo dnf install package-name
2. Update packages: sudo yum update or sudo dnf update
3. Remove a package: sudo yum remove package-name or sudo dnf remove package-name
4. Search for a package: sudo yum search package-name or sudo dnf search package-name

2. Administering Networking in RHEL

Explanation:

 This involves configuring network interfaces, managing services like DNS, DHCP, and ensuring proper
connectivity.

Steps:

1. Check current network configuration: nmcli or ifconfig


2. Edit network configuration files: Files are located in /etc/sysconfig/network-scripts/ifcfg-*
3. Restart network services: sudo systemctl restart NetworkManager

3. Examining and Configuring Network in Server

Explanation:

 Focuses on checking and modifying the network settings of a RHEL server.

Steps:

1. View network configuration: ip addr show


2. Edit network settings: Use nmtui for a text-based user interface or edit files in
/etc/sysconfig/network-scripts/
3. Apply changes: sudo systemctl restart network

4. Starting and Stopping Services in RHEL

Explanation:
 Managing the lifecycle of services (start, stop, restart, enable, disable).

Steps:

1. Start a service: sudo systemctl start service-name


2. Stop a service: sudo systemctl stop service-name
3. Enable a service to start at boot: sudo systemctl enable service-name
4. Check service status: sudo systemctl status service-name

5. Managing Daemons and Services in RHEL

Explanation:

 Daemons are background processes. Managing these involves ensuring they are running as needed.

Steps:

1. List all running daemons: ps -ef | grep daemon-name


2. Start/stop daemons using systemctl:
o Start: sudo systemctl start daemon-name
o Stop: sudo systemctl stop daemon-name

6. Configuring a Web Server in RHEL

Explanation:

 Setting up an Apache or Nginx web server on RHEL.

Steps:

1. Install Apache: sudo yum install httpd or sudo dnf install httpd
2. Start Apache: sudo systemctl start httpd
3. Enable Apache on boot: sudo systemctl enable httpd
4. Configure firewall: sudo firewall-cmd --add-service=http --permanent and sudo firewall-cmd
--reload

7. Managing a Basic Webserver

Explanation:

 Handling the basic configuration of a web server like serving static content.

Steps:

1. Create a web page: echo "Hello World" > /var/www/html/index.html


2. Check the web server: Open a browser and go to http://server-ip-address/

8. Advanced Webserver Management

Explanation:

 Managing more complex configurations such as virtual hosts, SSL, etc.

Steps:

1. Configure virtual hosts: Edit /etc/httpd/conf.d/vhost.conf


2. Enable SSL: Install mod_ssl (sudo yum install mod_ssl) and configure
/etc/httpd/conf.d/ssl.conf

9. Securing the Webserver Effectively

Explanation:

 Involves securing the webserver using firewalls, SSL, and other methods.

Steps:

1. Install SSL certificate: Configure in /etc/httpd/conf.d/ssl.conf


2. Firewall settings: Ensure only necessary ports are open (sudo firewall-cmd --list-all)

10. Managing Disks and File Systems

Explanation:

 Handling partitions, file systems, and ensuring proper disk management.

Steps:

1. View disk information: lsblk or fdisk -l


2. Create a partition: Use fdisk or parted
3. Format a partition: mkfs.ext4 /dev/sdaX
4. Mount a partition: mount /dev/sdaX /mnt

11. Making Simple Partitions

Explanation:

 Creating and managing disk partitions on RHEL.

Steps:
1. Open partition tool: fdisk /dev/sda
2. Create new partition: Use the n command in fdisk
3. Write changes: Use the w command

12. Logical Volume Management (LVM)

Explanation:

 Advanced disk management using LVM to create flexible disk storage.

Steps:

1. Create a physical volume: pvcreate /dev/sdaX


2. Create a volume group: vgcreate vg_name /dev/sdaX
3. Create a logical volume: lvcreate -L size -n lv_name vg_name
4. Format and mount: mkfs.ext4 /dev/vg_name/lv_name and mount /dev/vg_name/lv_name /mnt

13. Implementing Logical Volume Management (LVM)

Explanation:

 Using LVM for dynamic disk space management.

Steps:

1. Extend a logical volume: lvextend -L +size /dev/vg_name/lv_name


2. Resize the filesystem: resize2fs /dev/vg_name/lv_name

14. Configuring Samba Server in RHEL

Explanation:

 Samba allows file sharing between Linux and Windows systems.

Steps:

1. Install Samba: sudo yum install samba


2. Configure Samba: Edit /etc/samba/smb.conf
3. Start Samba services: sudo systemctl start smb nmb
4. Test the configuration: testparm

15. Deploy a Samba Share Directory

Explanation:
 Setting up a shared directory accessible from both Linux and Windows.

Steps:

1. Create a shared directory: mkdir -p /srv/samba/share


2. Configure in smb.conf: Add share definitions in /etc/samba/smb.conf
3. Set permissions: chmod -R 0755 /srv/samba/share

16. Configuring an NFS File Server in RHEL

Explanation:

 NFS allows file sharing over the network among Unix/Linux systems.

Steps:

1. Install NFS server: sudo yum install nfs-utils


2. Configure exports: Edit /etc/exports
3. Start NFS service: sudo systemctl start nfs-server
4. Check exports: exportfs -v

17. Deploy an NFS Share Export

Explanation:

 Creating an NFS share and exporting it to clients.

Steps:

1. Create export directory: mkdir /srv/nfs


2. Add to exports file: echo "/srv/nfs client-ip(rw,sync,no_root_squash)" >> /etc/exports
3. Export the directory: exportfs -a
4. Client mount: On client, use mount server-ip:/srv/nfs /mnt

18. Introducing Container Technology

Explanation:

 Introduction to containers, such as Docker, for application deployment.

Steps:

1. Install Docker: sudo yum install docker-ce


2. Start Docker service: sudo systemctl start docker
3. Pull a container image: docker pull image-name
4. Run a container: docker run -d image-name

19. Introduction to GIT

Explanation:

 Git is a version control system.


 Git helps you keep track of code changes.
 Git is used to collaborate on code.

What is Git?

Git is a popular version control system. It was created by Linus Torvalds in 2005, and has been
maintained by Junio Hamano since then.

It is used for:

 Tracking code changes


 Tracking who made changes
 Coding collaboration

What does Git do?

 Manage projects with Repositories


 Clone a project to work on a local copy
 Control and track changes with Staging and Committing
 Branch and Merge to allow for work on different parts and versions of a project
 Pull the latest version of the project to a local copy
 Push local updates to the main project

Working with Git

 Initialize Git on a folder, making it a Repository


 Git now creates a hidden folder to keep track of changes in that folder
 When a file is changed, added or deleted, it is considered modified
 You select the modified files you want to Stage
 The Staged files are Committed, which prompts Git to store a permanent snapshot of the
files
 Git allows you to see the full history of every commit.
 You can revert back to any previous commit.
 Git does not store a separate copy of every file in every commit, but keeps track of
changes made in each commit!

Why Git?

 Over 70% of developers use Git!


 Developers can work together from anywhere in the world.
 Developers can see the full history of the project.
 Developers can revert to earlier versions of a project.

What is GitHub?

 Git is not the same as GitHub.


 GitHub makes tools that use Git.
 GitHub is the largest host of source code in the world, and has been owned by Microsoft
since 2018.
 We will focus on using Git with GitHub.

Steps:

1. Install Git: sudo yum install git


2. Configure Git: git config --global user.name "Your Name"
3. Clone a repository: git clone repository-url
4. Commit changes: git add . and git commit -m "message"

Git Getting Started


Git Install
You can download Git for free from the following website: https://www.git-scm.com/

Using Git with Command Line


To start using Git, we are first going to open up our Command shell.

For Windows, you can use Git bash, which comes included in Git for Windows. For Mac and
Linux you can use the built-in terminal.

The first thing we need to do, is to check if Git is properly installed:

Example
git --version

git version 2.30.2.windows.1


If Git is installed, it should show something like git version X.Y

Configure Git
Now let Git know who you are. This is important for version control systems, as each Git
commit uses this information:

Example
git config --global user.name "w3schools-test"

git config --global user.email "[email protected]"

Change the user name and e-mail address to your own. You will probably also want to use this
when registering to GitHub later on.

Note: Use global to set the username and e-mail for every repository on your computer.

If you want to set the username/e-mail for just the current repo, you can remove global

Creating Git Folder


Now, let's create a new folder for our project:

Example
mkdir myproject

cd myproject

mkdir makes a new directory.

cd changes the current working directory.

Now that we are in the correct directory. We can start by initializing Git!

Note: If you already have a folder/directory you would like to use for Git:
Navigate to it in command line, or open it in your file explorer, right-click and select "Git Bash
here"

Initialize Git
Once you have navigated to the correct folder, you can initialize Git on that folder:

Example
git init

Initialized empty Git repository in /Users/user/myproject/.git/

You just created your first Git Repository!

Note: Git now knows that it should watch the folder you initiated it on.

Git creates a hidden folder to keep track of changes.

You might also like