在本教程中,我们学习如何在 debian 9 上安装 smartmontools。smartmontools 使用 SMART 控制和监控存储系统
介绍
在本教程中我们学习如何安装 smartmontools
在 Debian 9 上。
什么是 smartmontools
smartmontools 软件包包含两个实用程序(smartctl 和 smartd),用于使用大多数现代 ATA 和 SCSI 硬盘中内置的自我监控、分析和报告技术系统 (SMART) 来控制和监控存储系统。 它源自 smartsuite 软件包,并包含对 ATA/ATAPI-5 磁盘的支持。 它应该运行在任何现代 Linux 系统。
有三种安装方式 smartmontools
在 debian 9 上。我们可以使用 apt-get
, apt
和 aptitude
。 在以下部分中,我们将描述每种方法。 您可以选择其中之一。
更新 apt 数据库 apt-get
使用以下命令。
更新apt数据库后,我们可以安装 smartmontools
使用 apt-get
通过运行以下命令:
sudo apt-get -y install smartmontools
更新 apt 数据库 apt
使用以下命令。
更新apt数据库后,我们可以安装 smartmontools
使用 apt
通过运行以下命令:
sudo apt -y install smartmontools
如果您想遵循此方法,您可能需要先安装 aptitude,因为 debian 上通常默认不安装 aptitude。 更新 apt 数据库 aptitude
使用以下命令。
更新apt数据库后,我们可以安装 smartmontools
使用 aptitude
通过运行以下命令:
sudo aptitude -y install smartmontools
仅卸载 smartmontools
打包我们可以使用以下命令:
sudo apt-get remove smartmontools
卸载 smartmontools 及其依赖项
卸载 smartmontools
以及 debian 9 不再需要的依赖项,我们可以使用以下命令:
sudo apt-get -y autoremove smartmontools
删除 smartmontools 配置和数据
去除 smartmontools
来自 debian 9 的配置和数据我们可以使用以下命令:
sudo apt-get -y purge smartmontools
删除 smartmontools 配置、数据及其所有依赖项
我们可以使用下面的命令来删除 smartmontools
配置、数据及其所有依赖项,我们可以使用以下命令:
sudo apt-get -y autoremove --purge smartmontools
参考
概括
在本教程中我们学习如何安装 smartmontools
在 debian 9 上使用不同的包管理工具,如 apt、apt-get 和 aptitude。