CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the...

15
CIS305 Advance Linux Networking – Package Management Working with Systemd & Dnf Package Management in Linux Upon completion of this lab the student will be able to: 1. Describe how to update the operating system packages 2. Demonstrate the process of how to install a specific package 3. Describe how to show all install packages Background: In this lab the student will work with the most commonly used Linux command concepts. You will often find yourself having to know how to modify the initial operating system packages that where installed with the operating system with newer packages as they become available. Package managers download and install software and their updates as needed. This can be accomplished from the command line as well as from the GUI. Linux uses a new system of downloads and updates called systemd. Lab Instructions for Vcastle pod usage: The default password for Online students logging onto VCastle is ecpi2013 (all lowercase) you’re usernames should be their student ID (all lowercase). If the On-Campus students your instructor will provide you with your Vcastle server login credentials and URL address. Page 1 of 15

Transcript of CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the...

Page 1: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

Working with Systemd & Dnf Package Management in Linux

Upon completion of this lab the student will be able to:

1. Describe how to update the operating system packages2. Demonstrate the process of how to install a specific package3. Describe how to show all install packages

Background:

In this lab the student will work with the most commonly used Linux command concepts. You will often find yourself having to know how to modify the initial operating system packages that where installed with the operating system with newer packages as they become available. Package managers download and install software and their updates as needed. This can be accomplished from the command line as well as from the GUI. Linux uses a new system of downloads and updates called systemd.

Lab Instructions for Vcastle pod usage:

The default password for Online students logging onto VCastle is ecpi2013 (all lowercase) you’re usernames should be their student ID (all lowercase). If the student has used VCastle before they should continue using whatever password they used previously. Be sure to read the scheduling handout for Vcastle in your LMS shell.

On-Campus students your instructor will provide you with your Vcastle server login credentials and URL address.

Page 1 of 11

Page 2: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

Click on Enter Lab after scheduling your time to use your pod.

Click on the icon to open the viewer for the specific virtual machine.

Passwords:Server1 – Fedora 23 - Password1 root password - passwordClient1 - (Windows 10) –PIN 12345Client2 - Fedora 23 - password – Password1, root password - password

Lab Procedure

I. Determining How to Install Linux Packages

1. Logon to the computer running the Linux Operating system (Server1).

2. Login as superuser (su – password is “password”).

3. Open a terminal shell:

On Server1, click on Activities > Utilities >Terminal.Click on the Show Applications

Page 2 of 11

Page 3: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

Show Applications icon

Click on Utilities icon. (scroll down to the icon)

Then Click on Terminal.

Also you can type terminal in the search window and click on the terminal icon.

Page 3 of 11

Page 4: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

4. Type the following in the terminal to see where systemd is installed:

whereis systemd

5. Type the following in the terminal to see if system is running:ps –eaf | grep system

6. Type the following to view the system bootup process:systemd-analyze

7. Type the following to view the time each process took during bootup:

Page 4 of 11

Page 5: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

systemd-analyze blame

Type Ctrl^C to exit display.

8. Type the following to see if a particular service is running:systemctl status httpd (look under Active)

Page 5 of 11

Page 6: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

9. Type the following to see if a service is enable to start automatically when the OS starts:

systemctl is-enable httpd.service

10. If a service is not enabled, type the following to enable it at bootup:systemctl enable named.service

11. Type the following command to check to see if there are any updates dnf check-updatesysemctl is-enabled httpd

12. Type the following to update your system with the latest updates:dnf -y update or dnf –y upgrade

(If you leave the –y out, you must indicate yes to the question after issuing the command)

13. Type the following to see a listing of all packages:dnf list or dnf list all

Page 6 of 11

Page 7: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

14. Type the following to see packages installed:dnf list installed

15. Type the following tpo see groups of packages:dnf group list

Page 7 of 11

Page 8: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

16. Type the following to view enabled repositories:dnf repolist

17. Type the following in the terminal:dnf repository-packages fedora list installed

Page 8 of 11

Page 9: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

18.Type the following in the terminal:dnf install {package name}

example – dnf install nano

(If nano is installed skip this step and go to the next step.)

19. Type the following to remove a package:

Page 9 of 11

Page 10: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

dnf remove {package name}

example

dnf remove nano

20. Type the following to clean up and remove cached packages:dnf clean all

21. Type the following for help with dnf:dnf help or man dnf

22. Type the following to view the history of dnf usage:

Page 10 of 11

Page 11: CIS305 Advance Linux Networking – Package Management · Web viewType the following to view the system bootup process: systemd-analyze. Type the following to view the time each process

CIS305 Advance Linux Networking – Package Management

dnf history

23. Type the following to sync the distros repos to a stable release:dnf distro-sync

24. Type the following to view information about a specific package:dnf info {Package Name}

Example – dnf info nano

Page 11 of 11