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

Post on 19-Jun-2020

1 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lab #5 Guide:

Installing CentOS as a

Virtual Machine

CTEC1863/2019F

Operating SystemsMike Boldin

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

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

CentOS

• Recommended requirements:

– 1 GB RAM

– 20 GB disk space

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

CTEC1863 CentOS VM Guide 4

CENTOS INSTALLATION GUIDECTEC1863

CTEC1863 CentOS VM Guide 5

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

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).

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

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

VM Created

CTEC1863 CentOS VM Guide 10

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.

Installer - Language

CTEC1863 CentOS VM Guide 12

Installer - Settings

CTEC1863 CentOS VM Guide 13

1

2 3

4 Network (not shown here)4

1. Time Zone

CTEC1863 CentOS VM Guide 14

2a. Software Selection

CTEC1863 CentOS VM Guide 15

Choose“Server with GUI”

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

2b. Software Selection

CTEC1863 CentOS VM Guide 16

Choose“Server with GUI”

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

3a. Installation Destination

CTEC1863 CentOS VM Guide 17

1

2

3

3b. Installation Destination

CTEC1863 CentOS VM Guide 18

3c. Installation Destination

CTEC1863 CentOS VM Guide 19

4

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…

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…)

5a. Configuration

CTEC1863 CentOS VM Guide 22

1 2

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.

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).

6a. Installing…

CTEC1863 CentOS VM Guide 25

6b. Installing…

CTEC1863 CentOS VM Guide 26

6c. Installation Complete

CTEC1863 CentOS VM Guide 27

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

Start: VirtualBox POST Screen

CTEC1863 CentOS VM Guide 28

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

VirtualBox Boot Menu

CTEC1863 CentOS VM Guide 29

First Boot: CentOS Boot Menu

CTEC1863 CentOS VM Guide 30

7a. Initial Setup

CTEC1863 CentOS VM Guide 31

1

2

The license is simply the GPL.

I turned the network ONearlier…

7b. GPLv2

CTEC1863 CentOS VM Guide 32

1

2

7c. Initial Setup Complete

CTEC1863 CentOS VM Guide 33

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.

8b. Welcome

CTEC1863 CentOS VM Guide 35

8c. GNOME Help

CTEC1863 CentOS VM Guide 36

GNOME Desktop

CTEC1863 CentOS VM Guide 37

GNOME System Menu

CTEC1863 CentOS VM Guide 38

Volume

Network

Switch user

Control Panel

Lock screen

Shut down/Restart

Date, time & calendar

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.

Terminal

CTEC1863 CentOS VM Guide 40

From the Edit menu, choose Profile Prefences to customize

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 #.

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

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...

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.

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.

Updating CentOS (5)

CTEC1863 CentOS VM Guide 46

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

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

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…)

Installing Guest Additions (3)

CTEC1863 CentOS VM Guide 49

This is a SUCCESSFUL, command-line install…

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.

Installing Guest Additions (5)

CTEC1863 CentOS VM Guide 51

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

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…

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.

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.

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/

top related