lab #5 guide: installing centos as a virtual...

55
Lab #5 Guide: Installing CentOS as a Virtual Machine CTEC1863/2019F Operating Systems Mike Boldin

Upload: others

Post on 19-Jun-2020

1 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Lab #5 Guide:

Installing CentOS as a

Virtual Machine

CTEC1863/2019F

Operating SystemsMike Boldin

Page 2: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Tools, Materials and Equipment

• Oracle VirtualBox software

– official site: https://www.virtualbox.org/

• CentOS 7 DVD-R or .iso file

– official site:https://www.centos.org

– download link:http://isoredirect.centos.org/centos/7/isos/x86_64/

• Minimum 20 GB of hard disk space

• USB 3.x flash drive (min. 32 GB) or hard diskCTEC1863 CentOS VM Guide 2

Page 3: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

PLEASE READ FIRST!

• Important background information and examples regarding the following topics can be found in the "Installing Ubuntu as a Virtual Machine" guide

– VirtualBox

– PCs in L17

– Setting up a virtual machine (VM)

– Backing up a VM

CTEC1863 CentOS VM Guide 3

Page 4: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

CentOS

• Recommended requirements:

– 1 GB RAM

– 20 GB disk space

• https://wiki.centos.org/About/Product

CTEC1863 CentOS VM Guide 4

Page 5: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

CENTOS INSTALLATION GUIDECTEC1863

CTEC1863 CentOS VM Guide 5

Page 6: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

New Virtual Machine Example

• The following are actual screen shots from the installation on an L17 Dell PC, eight-core i7 processor, 32 GB RAM, running Windows 10 (No Hyper-V).

• My VirtualBox version is 6.0.10.

CTEC1863 CentOS VM Guide 6

Page 7: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

New

CTEC1863 CentOS VM Guide 7

CentOS is part of the Red Hat family of Linux distributions. It is comprised mainly of all of the GPL-licensed packages from Red Hat Enterprise Linux (RHEL).

Page 8: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

New: Storage

I am using a maximum of 15 GB on SSD. On your own PC, you may use a larger size.

Don’t forget to also add the VBoxGuestAdditions.iso as a virtual optical drive.

CTEC1863 CentOS VM Guide 8

Page 9: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

VM Created

CTEC1863 CentOS VM Guide 9

I used many of the same settings as for my Ubuntu VM; other settings are similar:

• 4 GB RAM• 64 GB VRAM• Bridged network

Page 10: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

VM Created

CTEC1863 CentOS VM Guide 10

Page 11: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Start

CTEC1863 CentOS VM Guide 11

The default is to test the media; press the I key to switch to “Install” and then press Enter.

Page 12: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Installer - Language

CTEC1863 CentOS VM Guide 12

Page 13: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Installer - Settings

CTEC1863 CentOS VM Guide 13

1

2 3

4 Network (not shown here)4

Page 14: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

1. Time Zone

CTEC1863 CentOS VM Guide 14

Page 15: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

2a. Software Selection

CTEC1863 CentOS VM Guide 15

Choose“Server with GUI”

“FTP Server” is shown; scroll down for more…

Page 16: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

2b. Software Selection

CTEC1863 CentOS VM Guide 16

Choose“Server with GUI”

Also add “Compatibility Libraries”,“Development Tools” and“System Administration Tools”

Page 17: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

3a. Installation Destination

CTEC1863 CentOS VM Guide 17

1

2

3

Page 18: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

3b. Installation Destination

CTEC1863 CentOS VM Guide 18

Page 19: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

3c. Installation Destination

CTEC1863 CentOS VM Guide 19

4

Page 20: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

4. Network & Host Name

CTEC1863 CentOS VM Guide 20

Turn network ON;We are using DHCP, so IP addresses and Host name do not need to be set…

Page 21: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

5. Ready to Begin

CTEC1863 CentOS VM Guide 21

After you choose your Software and set the Source, the “Begin Installation” button will become active(and the warning triangles will disappear…)

Page 22: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

5a. Configuration

CTEC1863 CentOS VM Guide 22

1 2

Page 23: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

5b. Root Password

CTEC1863 CentOS VM Guide 23

CentOS still creates a root (Administrator) user, which you will need to switch to, from time to time, for system admin tasks.

Page 24: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

5c. Create User

CTEC1863 CentOS VM Guide 24

I prefer using root for sysadmin tasks, but you can also set up sudo(like in Ubuntu).

Page 25: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

6a. Installing…

CTEC1863 CentOS VM Guide 25

Page 26: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

6b. Installing…

CTEC1863 CentOS VM Guide 26

Page 27: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

6c. Installation Complete

CTEC1863 CentOS VM Guide 27

The installation process may take 5 or 10 minutes (depending on your overall computer speed.)

Page 28: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Start: VirtualBox POST Screen

CTEC1863 CentOS VM Guide 28

I can press F12 to bootfrom a VirtualCD-ROMdrive;the defaultorder isdefined inthe VMSettings.

Page 29: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

VirtualBox Boot Menu

CTEC1863 CentOS VM Guide 29

Page 30: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

First Boot: CentOS Boot Menu

CTEC1863 CentOS VM Guide 30

Page 31: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

7a. Initial Setup

CTEC1863 CentOS VM Guide 31

1

2

The license is simply the GPL.

I turned the network ONearlier…

Page 32: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

7b. GPLv2

CTEC1863 CentOS VM Guide 32

1

2

Page 33: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

7c. Initial Setup Complete

CTEC1863 CentOS VM Guide 33

Page 34: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

8a. Login Screen

CTEC1863 CentOS VM Guide 34

List of users is here. If you click on “Not listed?”, you can log on directly as root.

Reboot and shutdown can be found here.

Page 35: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

8b. Welcome

CTEC1863 CentOS VM Guide 35

Page 36: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

8c. GNOME Help

CTEC1863 CentOS VM Guide 36

Page 37: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

GNOME Desktop

CTEC1863 CentOS VM Guide 37

Page 38: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

GNOME System Menu

CTEC1863 CentOS VM Guide 38

Volume

Network

Switch user

Control Panel

Lock screen

Shut down/Restart

Date, time & calendar

Page 39: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

GNOME Applications Menu

CTEC1863 CentOS VM Guide 39

From the Applications menu, open the Utilities sub-menu. Screenshot and Terminal are near the bottom.

Terminal is also in the list of common apps.

Page 40: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Terminal

CTEC1863 CentOS VM Guide 40

From the Edit menu, choose Profile Prefences to customize

Page 41: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Becoming root

CTEC1863 CentOS VM Guide 41

The su command, which stands for "switch user", is used to temporarily log on as the root user -- the system administrator.

The command line is: su -

On success (after entering the root password), the prompt character

changes to a #.

Page 42: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Updating CentOS

CTEC1863 CentOS VM Guide 42

The yum command, which stands for "Yellowdog Updater Modified" (but could also mean "yet another update manager"), is one of the tools used to manage software on RedHat Linux. To download and install updates, the command line (as root) is:

yum update

Page 43: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Updating CentOS (2)

CTEC1863 CentOS VM Guide 43

First, yum connects to a near-by mirror site to check software repositories for updates. It will then identify the packages that require updating...

Page 44: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Updating CentOS (3)

CTEC1863 CentOS VM Guide 44

After confirmation, yum will download and then install the updates. Note, after installation, the first update is quite large, as enough time has passed since the ISO image was created.

Page 45: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Updating CentOS (4)

CTEC1863 CentOS VM Guide 45

Finally, yum will install the downloaded updates in the correct order. If critical operating system components, such as the boot manager, (especially the) kernel, or runtime libraries have been updated, it is a good idea to reboot.

Page 46: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Updating CentOS (5)

CTEC1863 CentOS VM Guide 46

From time to time, there will be no available updates…

Page 47: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Installing Guest Additions

CTEC1863 CentOS VM Guide 47

As root, you must install pre-requisite software before installing the GAs.

Read the following article:

VirtualBox Guest Additions on Fedora 30/29, CentOS/RHEL 7.6/6.10/5.11

Page 48: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Installing Guest Additions (2)

CTEC1863 CentOS VM Guide 48

Same procedure as for Ubuntu:

1) Install the pre-requisite packages first;

2) From the VM menu, “Insert the GA image…”;

3) Run the installer software.

4) Or switch steps 1) and 2) and then find the mount point for the image and run the installer from the Terminal (shown here…)

Page 49: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Installing Guest Additions (3)

CTEC1863 CentOS VM Guide 49

This is a SUCCESSFUL, command-line install…

Page 50: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Installing Guest Additions (4)

CTEC1863 CentOS VM Guide 50

When graphical system administration tasks require rootaccess, the desktop will ask for authentication (similar to Ubuntu and Windows...).

Enter the root password.

Page 51: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Installing Guest Additions (5)

CTEC1863 CentOS VM Guide 51

The VBGA installer will open up a temporary Terminal window to install itself.

Page 52: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Installing Guest Additions (6)

CTEC1863 CentOS VM Guide 52

When the installer has completed, press Enter to close the window and restart CentOS.

This is a SUCCESSFUL, Desktop install…

Page 53: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Changing the Display Resolution

CTEC1863 CentOS VM Guide 53

After restarting, from the "system" menu at the top right, start the Settings app again.

This time, select Displays.

The default resolution is 800 x 600, which is too small for a modern, graphical Linux GNOME desktop.

Page 54: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

Changing the Display Resolution (2)

CTEC1863 CentOS VM Guide 54

In L17, 1280 x 960 works well on the ViewSonic or Dell monitors, butyou can choose whatever fits on your particular monitor.

Page 55: Lab #5 Guide: Installing CentOS as a Virtual Machinetechnology.niagarac.on.ca/courses/ctec1863/labs/lab05/VM... · 2019-09-10 · PLEASE READ FIRST! •Important background information

THE ENDCTEC1863 CentOS Guide

CTEC1863 CentOS VM Guide 55

For more information, see:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/