But what happens if the certificate for your Office Online Server (OOS) or Office Web Apps Server (OWAS) farm expires and your farm is not available anymore?
Obviously, OOS farm and your Skype for Business, Exchange & SharePoint integration stops working. Next thing to do will be to renew the expired certificate.
But how?
My MVP colleague Andi Krüger did a nice blog post on updating the farm certificate, and it’s fairly simple – Set-OfficeWebAppsFarm -CertificateName “RenewedOOSInternalCertificate” should do the trick… if your farm is running.
If things got out of hand and your farm is not running anymore and you cannot use the Set-OfficeWebAppsFarm cmdlet (you’ll see that Office Online (WACSM) service is Stopped and cannot be brought back up with the expired certificate and your machine is showing that it’s no longer part of the farm), you’ll need to take a different approach, because you’ll be getting errors when running the above mentioned command (like “It does not appear this machine is part of an Office Online Server farm.” or similar).
WACSM Service is Stopped and and your machine is showing that it’s no longer part of the farm
One of the possible solutions would be:
make a note of the Friendly Name of your old (expired) certificate (MMC or PowerShell) (in my case it’s called “OOSInternalCertificate“)
remove the expired certificate
renew/request/install the new certificate
change the Friendly Name of a new certificate to match the previous one
start the Office Online (WACSM) service or restart the machine
(copy the certificate/do the procedure on other farm members, if needed)
Everything is back normal
Your farm operations should now be restored and you can run Get-OfficeWebAppsFarm cmdlet normally:
Or you can open up the farm’s discovery URL – if it’s rendering again, everything should be OK (in my case “https://oos.myfarm.local/hosting/discovery“):
Not so long ago, we observed an issue with remotely accessing the PhysicalDisk counters on several machines, more specifically – there were none. 🙂
To be clear – if you opened up the Performance Monitor (perfmon.exe) on the affected machine, you can see all the counters, including the PhysicalDisk counters. But, if you opened up the Performance Monitor on a different machine and tried to access PhysicalDisk counters of the first machine over network, they aren’t shown anymore… but others (like CPU and Memory) are still there and can be used!
Counters shown normally on local computer and in local Performance Monitor
The same counters not visible from remote machine’s Performance Monitor
So… why? 🙂
At first, we thought that our monitoring software went berserk, but no – the PhysicalDisk counters on a remote machine were missing even we were using the built-in Performance Monitor tool (PhysicalDisk counters weren’t shown).
Next – maybe it’s something on the network? Of course, network is never the issue, but still… (wasn’t an issue here as well, because other counters worked without any issues)
Next, we thought, it’s related to the version of Windows accessing from, or the version at the destination – as we found out, too many different versions were impacted to hold that theory, so… no.
One thing we are not sure is if it’s caused by some of the “not so recent security patches”.
As we found the solution for our issue, what exactly caused it in the first place is not so important right now… Solution is simple – you actually need to run one command to re-register the system performance libraries with WMI (winmgmt /resyncperf) and then reboot the affected machine.
So, the commands you need are:
Shell
1
2
winmgmt/resyncperf
shutdown/r/t0
After that, we can access all the needed counters (PhysicalDisk) remotely again:
Counters shown normally from remote computer and in local Performance Monitor
Cheers!
P.S. Don’t forget to reboot the affected machine! 🙂
Learn software management with advanced Linux administration in this tutorial by Frederik Vos, a Linux trainer and evangelist and a senior technical trainer of virtualization technologies, such as Citrix XenServer and VMware vSphere.
— post by Frederik Vos, provided by Packt —
Software management
In the old days, installing software was a matter of extracting an archive to a filesystem. There were several problems with this approach:
It was difficult to remove the software if the files were copied into directories that were also used by another software
It was difficult to upgrade software, maybe because the files were still in use or were renamed
It was difficult to handle shared libraries
That’s why Linux distributions invented software managers.
The RPM software manager
In 1997, Red Hat released the first version of their package manager, RPM. Other distributions such as SUSE adopted this package manager. RPM is the name of the rpm utility, as well as the name of the format and the filename extension.
The RPM package contains the following:
A CPIO archive
Metadata with information about the software, such as a description and dependencies
Scriptlets for pre and post-installation scripts
In the past, Linux administrators used the rpm utility to install/update and remove software on a Linux system. If there was a dependency, the rpm command was able to tell exactly which other packages you needed to install. However, the rpm utility couldn’t fix the dependencies or possible conflicts between packages.
Nowadays, the rpm utility isn’t used any longer to install or remove software; instead, you use more advanced software installers. After the installation of software with yum (Red Hat/CentOS) or zypper (SUSE), all the metadata goes into a database. Querying this rpm database with the rpm command can be very handy.
A list of the most common rpm query parameters are as follows:
Parameter
Description
-qa
List all the installed packages.
-qi <software>
List information.
-qc <software>
List the installed configuration files.
-qd <software>
List the installed documentation and examples.
-ql <software>
List all the installed files.
-qf <filename>
Shows the package that installed this file
-V <software>
Verifies the integrity/changes after the installation of a package; use -va to do it for all installed software.
-qp
Use this parameter together with other parameters if the package is not already installed. It’s especially useful if you combine this parameter with –script to investigate the pre and post-installation scripts in the package.
The following screenshot is an example of getting information about the installed SSH server package:
The output of the -V parameter indicates that the modification time has changed since the installation. Now, make another change in the sshd_config file:
If you verify the installed package again, there is an S added to the output, indicating that the file size is different, and a T, indicating that the modification time has changed:
Other possible characters in the output are as follows:
S
File size
M
Mode (permissions)
5
Checksum
D
Major/minor on devices
L
Readlink mismatch
U
User ownership
G
Group ownership
T
Modification time
P
Capabilities
For text files, the diff command can help show the differences between the backup in the /tmp directory and the configuration in /etc/ssh:
Shell
1
sudo diff/etc/ssh/sshd_config/tmp/sshd_config
You can also restore the original file as follows:
Shell
1
sudo cp/tmp/sshd_config/etc/ssh/sshd_config
The DPKG software manager
The Debian distribution doesn’t use the RPM format; instead, it uses the DEB format invented in 1995. The format is in use on all Debian and Ubuntu-based distributions.
A DEB package contains:
A file, debian-binary, with the version of the package
An archive file, control.tar, with metadata (package name, version, dependencies, and maintainer)
An archive file, data.tar, containing the actual software
Management of DEB packages can be done with the dpkg utility. Like rpm, the utility is not in use any longer to install software. Instead, the more advanced apt command is used. All the metadata goes into a database, which can be queried with dpkg or dpkg-query.
The important parameters of dpkg-query are as follows:
-l
Lists all the packages without parameters, but you can use wildcards, for example, dpkg -l *ssh*
-L <package>
Lists files in an installed package
-p <package>
Shows information about the package
-s <package>
Shows the state of the package
The first column from the output of dpkg -l also shows a status as follows:
The first character in the first column is the desired action, the second is the actual state of the package, and a possible third character indicates an error flag (R). ii means that the package is installed.
The possible desired states are as follows:
(u) unknown
(h) hold
(r) remove
(p) urge
The important package states are as follows:
n(ot) installed
H(a)lf installed
Hal(F) configured
Software management with YUM
Your Update Manager or Yellowdog Updater Modified (YUM) is a modern software management tool that was introduced by Red Hat in Enterprise Linux version 5, replacing the up2date utility. It is currently in use in all Red Hat-based distributions but will be replaced with dnf, which is used by Fedora. The good news is that dnf is syntax-compatible with yum.
Yum is responsible for:
Installing software, including dependencies
Updating software
Removing software
Listing and searching for software
The important basic parameters are as follows:
Command
Description
yum search
Search for software based on package name/summary
yum provides
Search for software based on a filename in a package
yum install
Install software
yum info
Information and status
yum update
Update all software
yum remove
Remove software
You can also install patterns of software, for instance, the pattern or group File and Print Server is a convenient way to install the NFS and Samba file servers together with the Cups print server:
Command
Description
yum groups list
List the available groups.
yum groups install
Install a group.
yum groups info
Information about a group, including the group names that are in use by the Anaconda installer. This information is important for unattended installations.
yum groups update
Update software within a group.
yum groups remove
Remove the installed group.
Another nice feature of yum is working with history:
Command
Description
yum history list
List the tasks executed by yum
yum history info <number>
List the content of a specific task
yum history undo <number>
Undo the task; a redo is also available
The yum command uses repositories to be able to do all the software management. To list the currently configured repositories, use:
Shell
1
yum repolist
To add another repository, you’ll need the yum-config-manager tool, which creates and modifies the configuration files in /etc/yum.repos.d. For instance, if you want to add a repository to install Microsoft SQL Server, use the following:
Shell
1
2
3
yum-config-manager--add-repo\
https://packages.microsoft.com/config/rhel/7/\
mssql-server-2017.repo
The yum functionality can be extended with plugins, for instance, to select the fastest mirror, enabling the filesystem / LVM snapshots and running yum as a scheduled task (cron).
Software management with Zypp
SUSE, like Red Hat, uses RPM for package management. But instead of using yum, they use another toolset with Zypp (also known as libZypp) as backend. Software management can be done with the graphical configuration software YaST or the command-line interface tool Zypper. The important basic parameters are as follows:
Command
Description
zypper search
Search for software
zypper install
Install software
zypper remove
Remove software
zypper update
Update software
zypper dist-upgrade
Perform a distribution upgrade
zypper info
Show information
There is a search option to search for a command, what-provides, but it’s very limited. If you don’t know the package name, there is a utility called cnf instead. Before you can use cnf, you’ll need to install scout; this way, the package properties can be searched:
Shell
1
sudo zypper install scout
After this, you can use cnf:
If you want to update your system to a new distribution version, you have to modify the repositories first. For instance, if you want to update from SUSE LEAP 42.3 to version 15.0, execute the following procedure:
First, install the available updates for your current version:
Shell
1
sudo zypper update
Update to the latest version in the 42.3.x releases:
If you add a repository, you must always refresh the repositories:
Shell
1
sudo zypper refresh
Software management with apt
In Debian/Ubuntu-based distributions, software management is done via the apt utility, which is a recent replacement for the utilities, apt-get and apt-cache.
The most-used commands include:
Command
Description
apt list
List packages
apt search
Search in descriptions
apt install
Install a package
apt show
Show package details
apt remove
Remove a package
apt update
Update catalog of available packages
apt upgrade
Upgrade the installed software
apt edit-sources
Edit the repository configuration
Repositories are configured in /etc/apt/sources.list and files in the /etc/apt/sources.list.d/ directory. Alternatively, there is a command, apt-add-repository, available:
Shell
1
2
apt-add-repository\
'deb http://myserver/path/to/repo stable'
The apt repositories have the concept of release classes:
Old stable, tested in the previous version of a distribution
Stable
Testing
Unstable
They also have the concept of components:
Main: Tested and provided with support and updates
Contrib: Tested and provided with support and updates, but there are dependencies that are not in main, but for instance, in non-free