Open main menu

CDOT Wiki β

Changes

OPS705 Lab 3 (2207)

2,535 bytes added, 18:58, 5 October 2020
no edit summary
# In your home directory, recreate the directory tree in Figure 1. ''yourusername'' should be your own username home folder that already exists.
# '''Do not remove lab2.txt'''
 
= INVESTIGATION 3: Update CentOS =
This investigation simply has you update your CentOS Linux installation. We'll cover package / software management and security best practices in a later lab.
 
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 account you created should automatically have been added to this group as part of the Azure deployment process.
 
* Here's the update command for CentOS: <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>
 
The shell environment will ask you for your account password as an extra security precaution. When you type passwords on a Unix/Linux OS, the cursor remains blank and doesn't move. Just type it out carefully and hit Enter. It may take you a few tries the first time. You'll get used to it.
 
There will likely be further interaction for this 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.
 
Wait a few minutes for the OS to restart, and log back in. Voila, you're done!