Changes

Jump to: navigation, search
m
Protected "Tutorial 7 - Installing Linux / Live Linux / Virtualization": OER transfer ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
=INSTALLING LINUX / LIVE LINUX / VIRTUALIZATION=
Content under development.<br>===Main Objectives of this Practice Tutorial===
:* Download and install the '''VirtualBox''' VM software application
:* Download and run the install '''Knoppix Live VirtualBox fileRed Hat Enterprise Linux (RHEL)''' in a virtual machine
:* Open a terminal and connect to your Matrix account via the '''ssh''' utility
:* Run several '''open-source applications''' in your graphical Knoppix Linux RHEL environment :* Understand the '''limitation''' of running Knoppix Live as opposed to a '''persistent''' Knoppix installation
<br>
= INVESTIGATION 1: CREATING A RED HAT ACCOUNT AND DOWNLOADING THE ISO =
<span style="color:red;">'''ATTENTION''': The due date for successfully completing this tutorial (i.e. tutorial 17) is by Friday, December 15 April 21 @ 11:59 PM (Week 14).</span><br><br>
In this investigation, you will first create a Red Hat account and download the install medium (ISO). This is required to install Red Hat as a virtual machine in INVESTIGATION 2. Be sure to remember your login and password.
== Perform the Following Steps ==
* Navigate to [https://www.redhat.com/en Red Hat's website] (click on the link).
[[Image:1_-_Registering_for_a_Red_Hat_account.jpg|750px|Registering for a Red Hat account.]]
[[Image:3_-_Login_to_Red_Hat.jpg|750px|Red Hat account portal ]]
* Click Go to the [https://developers.redhat.com/ Red Hat Developers Portal]. Login with your new account and accept all terms and conditions. * Go back to the [https://www.redhat.com Red Hat website], login and click on '''Customer Portal'''. You should see the following screen.
[[Image:4_-_Customer_Portal.jpg|750px|Customer Portal]]
* Scroll down until you see Download Software. Click on '''DOWNLOADS'''Download software. This will take you to to You should see the following screen, where we will download Red Hat Enterprise Linux 8.
[[Image:5_-_Downloads.jpg|750px|Product Downloads]]
* You should see a download page for Click the arrow (highlighted in the previous screenshot) beside "Red Hat Enterprise Linux". Ensure under '''Product Variant''': it says '''Red Hat Enterprise Linux x86_64''' and '''Version: 8Then select Download latest.x It will take you to a download page (latestdepicted below)'''. Scroll down and next to '''Find the Full installation image. It should be labelled "Red Hat Enterprise Linux 89.4 1 Binary DVD''' click on '''". Click "Download Now'''". This process See the below screenshot for reference. Note: Downloading may take a few minutes (as the full dvd is a large file) some time depending on the speed of your internet Internet connection.
[[Image:6_-_Download_RHEL.jpg|750px|Download RHEL]]
= INVESTIGATION 2: CREATING A VIRTUAL MACHINE IN VMWARE AND INSTALLING RED HAT ENTERPRISE LINUX =
<span style="color:red;">'''ATTENTION''':You should already have VMWare Workstation installed from OSM620. If you do not, refer to OSM640 wk1 PreLab.</span>
In this investigation you will be creating a new virtual machine in VMWare Workstation and installing Red Hat Enterprise Linux 8.49. Keep this virtual machine (VM) after completing Tutorial 7 as you will require it for your Project.
* Launch VMware Workstation, and select '''Create a New Virtual Machine'''.
** Leave the defaults and login with the Red Hat Account you created in Investigation 1.
** Your system should now show as a Registered System at the bottom of the window.
** If you receive an error indicating you must accept the terms and conditions to continue, manually accept them by clicking on [https://www.redhat.com/wapps/tnc/standalone/ea this link].
* Click Date & Time. You should see the following screen.
[[Image:10_-_date_and_time.jpg|500px|Date & Time.]]
= INVESTIGATION 3: INSTALLING THE GLOBAL PROTECT VPN AND CONNECTING TO MATRIX FROM YOUR VIRTUAL MACHINE =
Installing software in Linux requires both an active Internet connection and knowledge of which package management tool to use for your distribution (or distro). Linux software and updates come from special sources hosted on other servers, known as repositories (or repos). All the major Linux distros host their own repos, though anyone can host a repository for a distribution - and many organizations do. Due to the Open Source nature of Linux, certain repos may contain specialized software that is not available in the main repository (such as EPEL - Extra Packages for Enterprise Linux); or they may contain a mirror of the main repo.
Accessing these and installing software requires using your Linux distro's command line package management tool. The major ones you will encounter when you use Linux are:
* [https://man7.org/linux/man-pages/man5/dnf.conf.5.html DNF] (Dandified Yum) - Which is an update of YUM (Yellowdog Updater, Modified). Both of these operate as a front end for [https://man7.org/linux/man-pages/man8/rpm.8.html RPM (Red Hat Package Manager)]. These are used in Red Hat based Linux distros, such as Red Hat Enterprise Linux and Fedora. The advantages of DNF and YUM over RPM is that they resolve dependencies (meaning if the software you are installing requires other software, they will install that as well). RPM does not do this, which can lead to a term known in industry as dependency hell.
* APT or [https://linux.die.net/man/8/apt-get APT-GET] (Aptitude Package Manager). This is used in Debian based Linux distributions such as Linux Mint, Ubuntu and Kali Linux.
* [https://archlinux.org/pacman/pacman.8.html Pacman] (Pacman Package Manager). This is used in Arch Linux, as well as a few others.
* [https://www.unix.com/man-page/suse/8/zypper/ Zypper] Package Manager. This is used in OpenSUSE, which is popular for use on servers in Europe.
 
Since we are using Red Hat Enterprise Linux (or RHEL), we will be using DNF to install software.
Your first step to installing software should always be to test your Internet connectivity, as without a working connection you cannot resolve anything. To do this we can use the tool '''ping''', which is commonly used to troubleshoot network connectivity issues.
 
* Click on Activities in the top left corner of your RHEL VM (right next to the tiny Red Hat) and launch the Terminal application.
[[Image:1_-_terminal.jpg | 500px | Launch the Terminal.]]
 
* Enter the command <span style="color:blue;font-weight:bold;font-family:courier;">ping www.google.com</span>
 
* This should succeed. If it fails, you may need to troubleshoot network issues. Ask your professor for assistance. Press '''ctrl + c''' at the same time to kill this process.
 
* While you can switch to the '''root''' user in your VM and install software, it's a bad practice to do this. In industry, admins are commonly granted permissions through '''sudo'''; which stands for "superuser do". This is similar to run as administrator in Windows. Sudo can be configured to allow users elevated privileges to a subset of commands, or all commands. Additionally, usage is logged to the appropriate user. This makes tracking the activity of a system with many administrators a lot easier. When you initially installed RHEL, you did not set up sudo. We will do so now.
 
* Initially you will have to switch to root to configure sudo. Do this by issuing the command <span style="color:blue;font-weight:bold;font-family:courier;">su -</span>
 
* You should see your prompt change to '''[root@localhost ~]#'''. Now issue the command <span style="color:blue;font-weight:bold;font-family:courier;">visudo</span>
 
* This will allow you to edit the /etc/sudoers file and add the user you created when you installed RHEL. visudo works like using vi, except it checks the file to ensure the syntax is correct. If it is not, it will give you a warning. This is an extremely useful tool. Find the line that reads as follows:
 
'''root ALL=(ALL) ALL'''
 
* This means that root is allowed to run from any terminal (first all), acting as any user (second all), and execute any command (third all). Below this line, add the following (substituting your username where appropriate). Be sure to enter insert mode by pressing the letter '''i''':
 
'''senecaid ALL=ALL'''
 
* When you are done, press '''esc''' followed by ''':x''' to save your changes. This should return you to your command prompt. We want to test our elevated privileges from our regular user, so return to your normal prompt by typing <span style="color:blue;font-weight:bold;font-family:courier;">exit</span>
 
* Now we are going to update our operating system. To do this, issue the command <span style="color:blue;font-weight:bold;font-family:courier;">sudo dnf -y update</span>
 
* You may be prompted for your password. The inclusion of the '''-y''' option, auto assumes yes to prompts (this can be very handy). The update process may take a while. Do not interrupt it.
 
* Download the package required to connect to Seneca's VPN [https://students.senecacollege.ca/spaces/186/it-services/wiki/view/1027/vpn-clients here] (click on the link for '''Linux GlobalProtect Agent'''. You may have to enter your Seneca username and password.
 
* Open your '''Terminal''' (cli) and change to your downloads folder <span style="color:blue;font-weight:bold;font-family:courier;">cd Downloads</span>
 
* Type '''ls''' to confirm your download is there. It should look something like '''PanGPLinux-5.3.3-c4.tgz'''
 
* The .tgz extension indicates the file is a tar that has been compressed with gzip. Extract it by issuing <span style="color:blue;font-weight:bold;font-family:courier;">tar xvf PanGPLinux-5.3.3-c4.tgz</span>
 
* Type '''ls''' to confirm the files were extracted. Note all the files ls displays. We are going to install the .rpm, as that is Red Hat's package manager using DNF. Be sure to install the correct RPM (do not the install the one that includes arm in the name).
 
* Type the following command to install the file: <span style="color:blue;font-weight:bold;font-family:courier;">sudo dnf -y localinstall GlobalProtect_UI_rpm-5.3.3.0-4.rpm</span>. '''Note:''' Your rpm package name might be slightly different as it may be a newer version.
 
* Now browse to the graphical '''GlobalProtect''' application and launch it.
 
* Enter StudentVPN.senecacollege.ca for the portal.
 
* Enter your credentials when prompted (just like you connect with the Windows or Mac apps).
 
* Now you should be able to ssh into Matrix. Test this by issuing the following Linux command <span style="color:blue;font-weight:bold;font-family:courier;">ssh yoursenecaid@matrix.senecacollege.ca</span>
 
* Enter '''yes''' to share your public key.
 
* When prompted, enter your password. Were you able to connect to your Matrix account?
* Confirm you are in your home directory. What command did you use?
 
* Use a '''text editor''' (nano or vi) to create a file in your current directory called '''myvm.txt''' and enter the following text:
<pre>
This is line 1
This is line 2
This is line 3
</pre>
* Save and exit the text editor.
* Confirm that you created this file, and confirm the contents are correct.
 
* Enter the command: <span style="color:blue;font-weight:bold;font-family:courier;">~osl640/week7-check-1</span> to submit your tutorial.
 
* Once this succeeds, you may exit and shutdown your vm. note: you can shutdown from the command line by issuing the command: '''poweroff'''.
 
<span style="color:red;">Important: Keep your RHEL VM, as you will need it for your project.</span>
= LINUX PRACTICE QUESTIONS =
 
The purpose of this section is to obtain '''extra practice''' to help with '''quizzes'''.
 
Here is a link to the [https://matrix.senecacollege.ca/~osl640/questions/osl640_week7_practice.docx MS Word Document of ALL of the questions] displayed below but with extra room to answer on the document to simulate a quiz:
 
Your instructor may take-up these questions during class. It is up to the student to attend classes in order to obtain the answers to the following questions. Your instructor will NOT provide these answers in any other form (eg. e-mail, etc).
 
'''Review Questions:'''
# Define the term '''Linux Distribution'''.
# List and explain '''two advantages''' of installing a Linux distribution on your home computer or laptop as either the host operating system or as a virtual machine.
# List and explain two things to consider prior to installing a Linux distribution on your home computer.
# Explain why installing '''Multi-boot''' for Linux is useful for '''computer troubleshooting'''.
# Define the term '''Virtualization'''.
# List the '''steps''' to install software or update your RHEL system.
# List '''4 applications''' that are contained in the Red Hat Enterprise Linux distribution.
# Explain the difference between a '''Live Linux distribution''' and an '''installed Linux distribution'''.
# Define the term '''repo''. What are repos (repositories) used for? What one did you add to your VM?
# What is '''sudo'''?

Navigation menu