You are on page 1of 10

MICRO-PROJECT REPORT

ON
A. Write a script to create a bash file with the name, ‘gpawhile.sh’, to know the use
of while loop. In this, loop will iterate for 5 times. The value of count variable will be
printed from 1 to 5 at each step.

B. Configure the applications through RPM.

In Partial fulfillment of Diploma in IT Engineering


(Sixth Semester)
In the subject of
Linux Administration (IF5470)
By
Ms. Chaitali Akhare
Ms. Pooja Atalkar
Ms. Swarupa Bhokare
Ms. Smita Rathod
Ms. Fareeha Naaz Ziya Athkar
Mr. Siddhant Shelke
Submitted To

Government Polytechnic, Amravati


(An Autonomous Institute of Govt. of Maharashtra)

Under the guidance of


Prof. Karde Sir
Lecturer in Information Technology
Department Information Technology
(2021-2022)

1
Government Polytechnic, Amravati
(An Autonomous Institute Of Govt. of Maharashtra)

Department of Information Technology


Engineering

Certificate
This is to certify that Mr/Ms. Chaitali Akhare , Pooja Atalkar , Swarupa Bhokare, Smita
Rathod, Freeha Naaz Ziya Akthar, Siddhant Shlke Identity Code. 19IF001, 19IF002,
19IF004, 19IF047, 20IF204, 20IF208, of Sixth Semester Diploma in Information Technology
has satisfactorily completed the micro-project entitled “A. Write a script to create a bash file
with the name, ‘gpawhile.sh’, to know the use of while loop. In this, loop will iterate
for 5 times. The value of count variable will be printed from 1 to 5 at each step. B.
Configure the applications through RPM” for the academic year 2021-2022 as prescribed in
the curriculum.

Place: Amravati Lecturer in Information


Technology
Date: / /2022

2
Annexure-I

PART A

Title of Micro Project:


a) Write a script to create a bash file with the name, ‘gpawhile.sh’, to know the use of while loop.
In this, loop will iterate for 5 times. The value of count variable will be printed from 1 to 5 at each
step
b) Configure the applications through RPM .
1.0 Brief Introduction

Create a bash script, you place #!/bin/bash at the top of the file.
Then, change the permissions on the file to make it executable:
$ chmod u+x scriptname
To execute the script from the current directory, you can run ./scriptname and pass any
parameters you wish.
When the shell executes a script, it finds the #!/path/to/interpreter.
It then runs the interpreter (in this case, /bin/bash) on the file itself.
The #! convention is why so many scripting languages use # for comments.

2.0 Aim of the Micro-Project


This Micro-Project aims at:
1) Designing a shell script program.
2) Understanding the concepts shell script programming.
3) Using basic concepts to perform operations on file.

3.0 Action Plan

Planned Planned ID .Code & Name of Team


S.N. Details of activity
start date Finish date Members
Discuss and Decide the
1 15/05/2022 15/05/2022 All group Member
topic.
Install linux operating
All Group Member
2 system to run shell script 16/05/2022 19/05/2022
program.
Implemented the logic
3 20/05/2022 22/05/2022 19IF004, 19IF047
for case statement.
Implemented logic for
4 25/05/2022 26/05/2022 20IF202, 19IF002
While loop
5 Report Editing 27/05/2022 28/05/2022 19IF001, 20IF208

4.0 Resources Required

3
S.N. Name of Resource/material Specifications Qty Remarks
1 Computer/ laptop Laptop/Computer with 1
minimum i3 processor
and 2 GB RAM
2 Operating System Linux 1

Guideline for Assessment of Micro-Project


Evaluation as per suggested Rubric for Assessment of Micro-Project
Assessment Characteristic to be assessed Average Good Excellent
Parameter (1 mark) (1.5 mark) (2 mark)
Process Relevance of the courses &
Assessment proposals
(06) Literature survey/market
survey/information collection
Analysis of data & completion of
the target as per proposal/
Product Report Preparation/Quality of
Assessment Prototype/model
(04) Presentation / Viva

4
Annexure-II
PART B

Title of Micro Project:


a) Write a script to create a bash file with the name, ‘gpawhile.sh’, to know the use
of while loop. In this, loop will iterate for 5 times. The value of count variable will be
printed from 1 to 5 at each step.
b) Configure the applications through RPM.

1.0 Brief Introduction

Create a bash script, you place #!/bin/bash at the top of the file.
Then, change the permissions on the file to make it executable:
$ chmod u+x scriptname
To execute the script from the current directory, you can run ./scriptname and pass any
parameters you wish.
When the shell executes a script, it finds the #!/path/to/interpreter.
It then runs the interpreter (in this case, /bin/bash) on the file itself.
The #! convention is why so many scripting languages use # for comments.

2.0 Aim of the Micro-Project


This Micro-Project aims at:
1. Designing a shell script program.
2. Understanding the concepts shell script programming.
3. Using basic concepts to perform operations on file

3.0 Course Outcomes Integrated


1. Install Linux operating system
2. Evaluate the basic Linux command and its utilities.
3. Develop shell program for solving different problems.

4.0 Actual Procedure Followed


Firstly, we discussed and decided the topic. Then installed the Linux operating system
and created a logic for program. After that we implemented a logic and created a
program.

5.0 Actual Resources used


S.N. Name of Resource/material Specifications Qty Remarks
1 Computer/ laptop Laptop/Computer with 1

5
minimum i3 processor
and 2 GB RAM
2 Operating system Linux 1

6.0 Output
Output is attached at the last of report.

7.0 Skills Developed/learning out of this Micro-Project


We learned about shell scripting program to perform different operations and got
knowledge about basic commands of shell scripting.
8.0 Application of this Micro-Project

6
a) Write a script to create a bash file with the name, ‘gpawhile.sh’, to know the use
of while loop. In this, loop will iterate for 5 times. The value of count variable will be printed
from 1 to 5 at each step.

Syntax:

#!/bin/bash

# Initialize the counter


n=1
# Iterate the loop for 5 times
while [ $n -le 5 ]
do
# Print the value of n in each iteration
echo " $n "
# Increment the value of n by 1
(( n++ ))
done

Output:

7
b) Configure the applications through RPM.

Step 1: Download RPM Installation File


Typically, a web browser is used to locate and download a .rpm file. However, if a browser is not
available you can still download a file if you know where it’s located.

You may need to install a software tool called wget.

To install wget in CentOS, enter the following in a terminal window:

sudo yum install wget

To install wget in Fedora, enter the following:

sudo dnf install wget

Now, you can use the wget command to download the .rpm file you want. Enter the following:

wget http://some_website/sample_file.rpm

The system should reach out to the website and download the file to your current working
directory.

Step 2: Install RPM File on Linux


Install RPM File Using RPM Command

To install a .rpm package in CentOS Linux, enter the following:

sudo rpm -i sample_file.rpm

The -i switch tells the package manager you want to install the file.

More information on the RPM installer can be found in the RPM documentation.

Install RPM File with Yum


Alternately, you can use the yum package manager to install .rpm files.

Enter the following:

8
sudo yum localinstall sample_file.rpm

The local install option instructions yum to look at your current working directory for the
installation file.

Note: YUM stands for Yellow dog Updater Modified. Normally, yum looks to your enabled
software repositories for new software packages to install. More recent verbiage suggests
using install instead of local install, but it’s up to you.
Install RPM on Fedora
To install an .rpm package on Fedora Linux, enter the following:

sudo rpm -i sample_file.rpm

Just as in CentOS, the -i switch tells RPM to install the software.

Another method is to use the dnf utility to install the package:

sudo dnf localinstall sample_file.rpm

Unlike many Linux tools, DNF is not a set of initials. It is merely the next evolution of
the yum package manager.

Remove RPM Package


The RPM installer can be used to remove (or uninstall) a software package.

Enter the following into a terminal window:

sudo rpm -e sample_file.rpm

The -e option instructs RPM to erase the software. Check RPM Dependencies

So far, this guide assumes the software either doesn’t have dependencies or already has them
installed.

To check the .rpm file for dependencies using the following command:

9
sudo rpm -qpR sample_file.rpm

The system should list all the dependencies:

 -q – This option tells RPM to query the file


 -p – This option lets you specify the target package to query
 -R – This lists the requirements for the package

If there are any missing dependencies, you can install them from the standard repositories
using yum or dnf. If your software requires other non-standard software, it will often be noted in
the installation instructions.

Download RPM Packages from the Repository


One exciting feature of the yum package manager is that it allows you to download .rpm files
directly from the repository. This might be helpful if you have limited bandwidth, or want to copy
a single downloaded file between systems. It could also help if you have intermittent internet
access, and you don’t want to spend time waiting for your installer to finish.

To download a .rpm file from the repositories, enter the following:

sudo yumdownloader packagename

10

You might also like