Lab 2b: System Updates
In this module we try to learn how to update a system
Enable Linux Networking
In order to install updates, the server needs to be connected to the internet (both Linux and Windows). In the Linux virtual machine supplied, networking is initially disabled (the ‘NetworkManager’ service).
We need to do two things: start the NetworkManager service running right now and enable the NetworkManager service so that it starts every time the virtual machine boots.
start the NetworkManager service
# systemctl start NetworkManager.service
enable the NetworkManager service
# systemctl enable NetworkManager.service
The econd command using systemctl to enable the NetworkManager.service, will starts up automatically the network manager when the machine boots.
Updates for Linux
By default, Redhat derivate Linux operating systems with a GUI use the Gnome Software manager to monitor and update system software on your Linux configuration. This is in a package called ‘PackageKit’.
To start the Gnome Software Manager, run the command:
# gnome-software
You can also start it from the icon that looks like a shopping bag:
Alternative installation method
We can use the yum command to update packages. This is often a safer way of doing updates.
Yum commands include:
yum check-update (check for updates)
yum search XXXXX (search for a keyword XXXXX to find packages mentioning this word)
yum install XXXXX (where XXXXX is the package name)
yum update XXXXX (where XXXXX is the package name)
yum remove XXXXX (where XXXXX is the package name)
Yum automatically determines the dependencies and can warn you. You can also use the various options of yum to only load security or advisory fixes.
Updates for Windows
Windows manages updates quite simply, however it is not recommended to automatically perform updates on a running server. Can you think of any reasons why??
Within Server Manager, on the “Local Server” the dashboard should show you some information about when updates were last installed and the update policy.
To run updates, we can click on these links in Server Manager, or you can go to the settings area and search for “Windows Update” in the Update & Security section.
Generally, Windows Server updates are usually well tested and can be installed. Be careful of optional updates such as .NET framework etc
We can also check for and install updates in Windows from the command line. While we can do it from the Command Prompt, Windows PowerShell provides a module for working with Windows update from the command line.
Open Windows PowerShell. To install the module, type:
Install-Module PSWindowsUpdate
It will probably prompt you / warn you about installing other dependent software – choose ‘Yes’ if asked.
Once installed, you can use PowerShell commands (“cmdlets”) like:
Get-WindowsUpdate
//Check for updates (probably nothing if you already did it in the GUI)
Get-WULastResults
//Show results of the last time updates were checked
Get-WUHistory
//Show history of updates installed
Get-WURebootStatus Does the system need rebooting to install most recent updates?