To upgrade Cacti under UNIX style operating systems is very strait
forward. To upgrade Cacti on Windows, you should use the instructions
in the Link below:
在 UNIX 风格的操作系统下升级 Cacti 是非常艰难的。要在 Windows 上升级 Cacti,您应该使用下面链接中的说明:
Upgrading in Windows 在 Windows 中升级
Before you begin, generally both your Apache/NGINX and your Crontab or
systemd based pollers should run as the same account. In most Linux
operating systems these days, that'll be the apache
account. Under
SLES, it'll be www-run
. For this guide, we will use the apache
account
but please keep this in mind before starting.
在开始之前,通常您的 Apache/NGINX 和基于 Crontab 或 systemd 的轮询器都应该作为同一帐户运行。如今,在大多数 Linux 操作系统中,这将是 apache
帐户。在 SLES 下,它将是 www-run
.在本指南中,我们将使用该 apache
帐户,但在开始之前请记住这一点。
Backup the old Cacti database.
备份旧的 Cacti 数据库。
shell> mysqldump -l --add-drop-table --lock-tables=false cacti > mysql.cacti
NOTE: You will probably have to specify the -u and -p flags for the MySQL username and password. This user must have permission to read from Cacti's database or you will end up with an empty backup.
注意:您可能需要为 MySQL 用户名和密码指定 -u 和 -p 标志。此用户必须具有从 Cacti 数据库读取的权限,否则您最终将得到一个空备份。
Backup the old Cacti directory with the exception of the RRDfiles which
should not need backup.
备份旧的 Cacti 目录,但 RRD 文件除外,它不需要备份。
shell> tar --exclude=*.rrd -zcf cacti_backup_YYYYMMDD.tgz cacti
Extract the distribution tarball.
解压分发压缩包。
shell> tar -xzvf cacti-version.tar.gz
Copy the distribution tarball over the existing installation.
将分发 tarball 复制到现有安装上。
shell> /bin/cp -rpf cacti-version cacti
Set the appropriate permissions on Cacti's directories for graph/log
generation. You should execute these commands from inside Cacti's directory
to change the permissions.
在 Cacti 的目录中设置适当的权限以生成图形/日志。您应该从 Cacti 的目录中执行这些命令以更改权限。
shell> chown -R apache:apache rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the
next step for data gathering.)
(为仙人掌用户输入有效的用户名,此用户也将在下一步用于数据收集。
If you are using the optional feature Performance > Image Caching
, or
Realtime Graphing, then recreate the cache
folder and correct the permissions.
如果您正在使用可选功能 Performance > Image Caching
或实时绘图,请重新创建 cache
文件夹并更正权限。
shell> mkdir cache
shell> chown -R apache:apache cache
Point your web browser to:
将您的 Web 浏览器指向:
http://your-server/cacti/
Follow the on-screen instructions so your database can be updated to the
new version.
按照屏幕上的说明进行操作,以便将数据库更新到新版本。
NOTE: That starting with Cacti 1.0, all Data Collectors will upgrade themselves automatically within two polling cycles. If for some reason they do not, upgrade them one at a time using the procedure above.
注意:从 Cacti 1.0 开始,所有数据收集器将在两个轮询周期内自动升级。如果由于某种原因它们没有,请使用上述过程一次升级一个。