Cacti 是一种网络绘图解决方案,旨在利用 RRDTool 的数据存储和绘图功能的强大功能。它提供了快速轮询器、高级图形模板、多种数据采集方法和用户管理功能。 仙人掌的好处很多。它提供了一个直观且易于导航的 Web 界面,使初学者可以使用它。它还具有高度可定制性,允许根据特定需求定制各种图表。
在 Manjaro 上安装仙人掌
步骤 1。在安装任何新软件之前,必须确保您的系统是最新的。打开终端并输入以下命令:
<span class="pln">sudo pacman </span><span class="pun">-</span><span class="typ">Syu</span><span class="pln"> sudo pacman </span><span class="pun">-</span><span class="pln">S </span><span class="kwd">base</span><span class="pun">-</span><span class="pln">devel</span>
第2步。安装 LAMP(Linux、Apache、MySQL、PHP)堆栈。
在安装 Cacti 之前,您需要在 Manjaro 服务器上设置 LAMP(Linux、Nginx、MariaDB、PHP)堆栈。
第 3 步。在 Manjaro 上安装 Cacti。
现在,是时候下载并安装 Cacti 了。使用以下命令:
<span class="pln">sudo pacman </span><span class="pun">-</span><span class="pln">S cacti rrdtool net</span><span class="pun">-</span><span class="pln">snmp</span>
要启动、停止和重新启动 Cacti 服务,请使用以下命令:
<span class="pln">sudo systemctl start cacti sudo systemctl stop cacti sudo systemctl restart cacti</span>
第 4 步。配置 Cacti。
安装 Cacti 后,需要对其进行配置:
<span class="pln">sudo mysql </span><span class="pun">-</span><span class="pln">u root </span><span class="pun">-</span><span class="pln">p CREATE DATABASE cacti</span><span class="pun">;</span><span class="pln"> GRANT ALL ON cacti</span><span class="pun">.*</span><span class="pln"> TO cacti@localhost IDENTIFIED BY </span><span class="str">'your-strong-password'</span><span class="pun">;</span><span class="pln"> FLUSH PRIVILEGES</span><span class="pun">;</span><span class="pln"> EXIT</span><span class="pun">;</span>
将“your-strong-password
”替换为您选择的安全密码。
接下来,我移植 Cacti 数据库模式:
<span class="pln">sudo mysql </span><span class="pun">-</span><span class="pln">u cactiuser </span><span class="pun">-</span><span class="pln">p cacti </span><span class="pun"><</span> <span class="str">/usr/</span><span class="pln">share</span><span class="pun">/</span><span class="pln">webapps</span><span class="pun">/</span><span class="pln">cacti</span><span class="pun">/</span><span class="pln">cacti</span><span class="pun">.</span><span class="pln">sql</span>
出现提示时,输入 Cacti 用户的密码。
之后,edit Cacti 配置文件:
<span class="pln">sudo nano </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">share</span><span class="pun">/</span><span class="pln">webapps</span><span class="pun">/</span><span class="pln">cacti</span><span class="pun">/</span><span class="pln">include</span><span class="pun">/</span><span class="pln">config</span><span class="pun">.</span><span class="pln">php</span>
使用 Cacti 用户和密码更新数据库设置:
<span class="pln">$database_username </span><span class="pun">=</span> <span class="str">'cactiuser'</span><span class="pun">;</span><span class="pln"> $database_password </span><span class="pun">=</span> <span class="str">'your-strong-password'</span><span class="pun">;</span>
第 5 步。访问 Cacti Web UI。
要验证 Cacti 是否已正确安装,请打开 Web 浏览器并导航到 。您应该会看到 Cacti 登录页面。http://your-IP-address/cacti
使用默认用户名和密码登录:
<span class="typ">Username</span><span class="pun">:</span><span class="pln"> admin </span><span class="typ">Password</span><span class="pun">:</span><span class="pln"> admin</span>
感谢您使用本教程在 Manjaro 系统上安装最新版本的 Cacti 基于 Web 的系统监控。如需更多帮助或有用信息,我们建议您查看仙人掌官方网站。