Open main menu

CDOT Wiki β

Changes

OPS705 Lab 2 (2217)

3,007 bytes added, 20:50, 29 September 2021
no edit summary
# Using Figure 2 as a model, create the '''~/shared''' directory structure
# Using Figure 2 as a model, move the files from '''~/tmp''' to their proper location in '''~/shared'''
 
= INVESTIGATION 1: Update Linux =
This investigation simply has you update your CentOS installation. This includes operating system packages, as well as any other packages that have been installed using yum.
 
Updating the OS, by its very nature, changes the system. '''Any command or utility that performs system-wide changes can only be run by a system administrator.''' Remember that.
 
To update the operating system, you'll need to have administrative access. There are two ways to do this: logging in to an admin account, or running a command as your regular user with temporary admin powers. We call this ''privilege elevation'' or ''elevating your privileges''. Only regular user accounts that belong to the admin group can do this. The name of the admin group changes depending on the distribution of Linux; for CentOS, it's the '''wheel''' group. The first user account was automatically added to this group as part of the Azure VM deployment process.
 
First, let's login:
# Start your Linux VM in Azure (this may take a few minutes)
# Connect to the VM remotely via SSH using your regular account. (Refer to [[OPS705_Lab_2 | Lab 2]])
 
Now, let's update the system:
* Here's the update command for this distro: <code>yum update</code>
 
Running this as a regular user will give you an error. To temporarily elevate your privileges for the duration of a command, type <code>sudo</code> before said command.
 
* For example: <code>sudo yum update</code>
 
Normally, the shell environment will ask you for your account password as an extra security precaution. However, cloud-based Linux VMs typically have password-less sudo access. The idea is that identity management and security is handled by the cloud infrastructure. We'll explore that in detail later in the course.
 
There will likely be further interaction for this update command, mostly asking you to confirm an action. For updates, you can type <code>y</code> and hit Enter safely. That said, do get in the habit of reading warnings and when it asks for your confirmation.
 
The update command will look for updates, download the install files, and then update the system. Most updates don't require a restart (unlike Windows!), except for kernel updates. The kernel is the very basic building block of the system; sort of the heart. It's responsible for many of the most basic functions a computer performs. If a kernel update is installed, you need to restart the system to use the new kernel. As this is your first update, you'll likely have a kernel update.
 
* When complete, restart the system with the following command: <code>sudo reboot</code>
 
You'll be disconnected from your remote session as the SSH server inside your VM shuts down.
 
It may take a few minutes for the VM to restart. You can track it's progress through the Azure DTL Overview page. Once back up and running, log back in to confirm everything still works.
= Lab Submission =
# From your home directory, run <code>tree</code>. Your screenshot should contain the entire output. (To install tree, run: <code>sudo yum install tree</code>)
# Run the following command and screenshot: <code>hostnamectl</code>
# Run the '''yum update'' command to show there are no further updates to install and screenshot the result.
Your professor will review your VMs directly; the screenshots are a backup in case of catastrophic issues.