How To Install ohai on Debian 9
Introduction
In this tutorial we learn how to install ohai
on Debian 9.
What is ohai
ohai is:
Information about your system is collected and returned as multidimensional attributes in JSON format. The following information is captured:
- Operating system and kernel
- Filesystems in use
- Network configuration and statistics
- Available languages
- Virtualization
There are three methods to install ohai
on Debian 9. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install ohai Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install ohai
using apt-get
by running the following command:
sudo apt-get -y install ohai
Install ohai Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install ohai
using apt
by running the following command:
sudo apt -y install ohai
Install ohai Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install ohai
using aptitude
by running the following command:
sudo aptitude -y install ohai
How To Uninstall ohai on Debian 9
To uninstall only the ohai
package we can use the following command:
sudo apt-get remove ohai
Uninstall ohai And Its Dependencies
To uninstall ohai
and its dependencies that are no longer needed by Debian 9, we can use the command below:
sudo apt-get -y autoremove ohai
Remove ohai Configurations and Data
To remove ohai
configuration and data from Debian 9 we can use the following command:
sudo apt-get -y purge ohai
Remove ohai configuration, data, and all of its dependencies
We can use the following command to remove ohai
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge ohai
Dependencies
ohai have the following dependencies:
- ruby
- ruby-chef-config
- ruby-ffi
- ruby-ffi-yajl
- ruby-ipaddress
- ruby-mixlib-cli
- ruby-mixlib-config
- ruby-mixlib-log
- ruby-mixlib-shellout
- ruby-plist
- ruby-systemu
References
Summary
In this tutorial we learn how to install ohai
package on Debian 9 using different package management tools: apt
, apt-get
and aptitude
.