Tutorial 1: Using Your Matrix Server Account

From CDOT Wiki
Revision as of 15:41, 31 December 2019 by Msaul (talk | contribs) (INVESTIGATION 3: Using Shell Scripting to Generate System Information Reports)
Jump to: navigation, search

LEARNING ABOUT YOUR MATRIX SERVER ACCOUNT

Main Objectives of this Practice Tutorial

  • Understand the purpose of the Matrix server and the advantages of combining Linux servers to form a cluster.
  • List the steps to connect to your Matrix server account in the computer labs at Seneca College.
  • List the steps to connect to your Matrix server account from a computer outside of Seneca College.
  • Working with the Linux Command Prompt (Linux shell)
  • Changing your Matrix Account Password
  • Exiting your Matrix Linux Account
  • Performing Review Questions for Additional Practice

Purpose of Having a Matrix Account

A shell is simply an interface / interpreter to allow a user to communicate with the Linux computer system.

Although you need to study concepts throughout this course, you will also need to learn to issue and memorize simple as well as more advanced Linux commands. This requires that you practice issuing Linux commands on a frequent basis to become more comfortable when working the Unix and Linux command-line environments.

Just like with other operating systems like MS Windows, it is important to learn how to open a command prompt in order to issue Linux commands to perform common Linux OS tasks. In Unix/Linux, a shell is simply an interface / interpreter to allow a user to communicate with the Linux computer system (server). Linux shells have evolved (improved) over a period of time. You will be using the Bash Shell which is considered to be user-friendly.

The Matrix server has been configured to allow users to only interact with the Linux OS by issuing commands. There are various reasons for this, but the main 2 reasons are to force students to learn how to issue Linux commands as well as limitations to remote access to a graphical Linux server due to large number of users (students).

Later in the course, your instructor may discuss other ways of accessing graphical versions of Linux, and how to launch a shell terminal.

Layout of the Matrix Server

The Matrix server consists of several Virtual Computers all connected together to form a cluster. A cluster is a cost effective alternative to larger servers.

The Matrix server consists of several Virtual Computers connected together to form a cluster. A cluster is a cost effective alternative to buying larger servers.

All registered students in this course have access to an account on the Matrix server. You will be using this account for the following reasons:

  • Issuing Linux commands
  • Becoming productive using the Linux command prompt (shell)
  • Performing Linux Practice Tutorials
  • Performing Linux Assignments (3)
  • Practice Issuing Linux Command Review Questions


In the next section, you will learn how to connect to and login to your Matrix server account both at the college and from a remote computer such as your home computer or your laptop computer.

INVESTIGATION 1: ACCESSING YOUR MATRIX LINUX ACCOUNT

In this section, you will learn how to access your Matrix Linux account by two different methods:

  • From within a workstation within a Seneca College lab
  • From your own computer within or outside Seneca College

Part 1: Accessing your Matrix Account from a Seneca College Lab

x

Perform the Following Steps:


  1. Although the images may be a little out of date (i.e. not exact), you can refer to this listing of installation screenshots for general reference:
    [installation screen-shots ]
  2. Power up the computer in your Seneca lab in Windows.

x

Part 2: Access your Matrix Account From your own computer within or outside Seneca College

x

Perform the following steps:
  1. Select from the installation menu: Install CentOS 7.
  2. Next, you will be prompted for a language. In the first screen, select language English with subselection English-Canada and then click the Continue button on the bottom right-hand screen.

INVESTIGATION 2: USING YOUR MATRIX ACCOUNT

Linux Commands Used (click for online help):

Logging Out of Linux Account

Change Password

x

Perform the following steps:
  1. Open Terminal.
  2. Login as root: su -
  3. Type: yum update
  4. Follow the prompts.
  5. If there is a kernel update, reboot your system. (There usually is on a first update after OS installation.)

INVESTIGATION 3: RUNNING YOUR ONLINE ASSIGNMENT 1

x


Perform the Following Steps:
  1. Study the Linux commands and their purpose to note computer software information for your installed c7hostVM. You should take time to issue each of these commands to view the output, and record this chart in your lab1 logbook.

  2. Login to your c7hostVM, open a Bash Shell terminal, and login as root by issuing the command:
    su -

  3. Make certain to record output from these commands (except for the ps -ef output) in your lab1 logbook.

x

LAB 1 SIGN-OFF (SHOW INSTRUCTOR)

Students should be prepared with all required commands (system information) displayed in a terminal (or multiple terminals) prior to calling the instructor for signoff.


Shell scripting is so essential for Linux administration that this course has created a shell script for every lab for this course that a student must download and run in order to check their work.

If you have performed the lab correctly, then you will get a series of  OK  messages and you can proceed with the SIGN-OFF for lab1. On the other hand, if there were errors, then a  WARNING  message will appear with general suggestions that you will need to fix on your c7hostVM in order to have your OPS235 sign-off in this lab in order to proceed to the next lab.

Perform the Following Steps:
  1. Make certain that your c7host VM is running, open the Bash Shell terminal and issue the command: su - and enter root's password.

  2. Change to the /root/bin directory.

  3. Download the checking script by issuing the following Linux command:
    wget https://ict.senecacollege.ca/~ops235/labs/lab1-check.bash

  4. Give that downloaded shell script file execute permissions (for the file owner).

    FYI: Your checking script will not work unless you issued "su -" instead of just "su".

  5. Run the shell script and if any warnings, make fixes and re-run shell script until you receive "congratulations" message.

  6. Arrange evidence (command output) for each of these items on your screen, then ask your instructor to review them and sign off on the lab's completion:
Run the lab1-check.bash script in front of your instructor (must have all  OK  messages)
Proof that c7host VM is set for virtualization (Refer to: INVESTIGATION 1 - Part 1 - Step #29)
Lab1 logbook containing the values for:
  • IP address, MAC address, Default route (gateway) and
    DNS name server IP Address

Practice For Quizzes, Tests, Midterm & Final Exam

  1. Define the term Virtual Machine.
  2. List the major screens (steps) in the installation of Centos7 full install DVD.
  3. What key-combination is used to toggle the view of your running VM from "window-mode" to "full-screen-mode"?
  4. List the steps for disabling SELinux.
  5. List 2 ways that you can access your root account
  6. What is the difference between the commands su and su -  ?
  7. What is the home directory for the user "root"?
  8. How do you determine the host name of your GNU/Linux workstation?
  9. What command can display the NIC's MAC address?
  10. What command is used to get a list of running processes on your newly-installed system?
  11. Write the Linux command to download the on-line file: http://linux.server.org/package.tar.gz
  12. Write a Bash Shell Script to prompt the user for a directory, and then display the file types for all files in that specified directory (hint: use the read command and then use the file command and command substitution with the ls command). Test the Bash Shell script by adding execute permissions and run the Bash Shell Script.
  13. Modify the previously created shell script to perform error checking after prompting for a directory to test if the specified directory does not exist. If it does NOT exist (i.e. true), display an error message indicating that the directory does NOT exist, and issue the command exit 1 to terminate the Bash Shell Script. Test the Bash Shell script by adding execute permissions and run the Bash Shell Script.