0% found this document useful (0 votes)
24 views

SA Assignment

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

SA Assignment

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

Systems Administration Lab Assignment

Q1: follow the steps below:


1- Open the link ( https://www.redhat.com/en/interactive-labs) and go to
the terminal
2- Create a user account (using your name_StudentID) as it is shown

3- Switch to your user account as it is shown

4- Exit from your user account as it is shown

5- Try to install httpd service using this command:


a. Yum install httpd
6- Check if the service ( httpd) is enabled or not
7- Check the status of httpd service
8- Start the service (httpd)
9- Check the status of the service again
10- Enable the service (httpd)
11- Reload the service (httpd)
12- Check the status of the service again
13- Restart the service (httpd)
14- Check the status of the service
Do not forget to press q when needed.
What is the difference you have noticed between restart and reload? .
Note: each time you check the status of the service, you have to switch to
your user account
Q2: Suppose you have two hard disks (sda,sdb) and sdb has already
been partitioned to sdb1 and sdb2.
1. Create physical volumes using the whole sda and the two partitions
of sdb.
2. Create a volume group that contains a complete sda disk and one
partition on another disk .
3. create two logical volumes ( a small one and a bigger one) in this
volume group .
4. Format all logical volumes with ext4 and mount them.
5. Extend the volume group.
6. Extend only one logical volume.
-You have to suggest the size of each hard disk and also make sure to give
the appropriate size for each logical volumes.
-Do not forget to use commands that check each step you do .
The answer of the second question is only acceptable if you write it
by your hand.
Q3: Answer only one of the following questions and take a screen
shot of the program you edited in nano editor and the output:
1. Write a shell script that calculates the sum of the first “n” numbers
2. Write a shell script that uses a function to print a grade (A,B,C,D,F) of
a student based on the entered mark
3. Write a shell script that uses a function to read an age and print
“child for age less than 18, Adult for age less that 60 , senior for more
than 60”

At the beginning of your program , you have to print a message that


asks for your name and ID and then it displays the following message
“ Welcome your name, your ID”.

To solve the last question you should use one of the following:
• Linux system or Git or this online tool
https://www.mycompiler.io/new/bash if you do not have a
computer.
• In addition to the screen shot ,you have to record a video if you use
the online tool and explain your code.

You might also like