Coolloves 发表于 2013-08-31 22:28

关于cacti数据库问题,虚心请教!

公司目前用的cacti是个中文版的,我自己安装了一台备用机器,是从官网下载的最新版本,不过是英文的。现在从正在使用的机器上导出了数据库,然后导入备机出现了问题:
1-导入数据后,模板,图像,以及图像树中有中文的全部显示为问号,*(我安装的备机是可以正常显示中文的,包括图像也可以正常显示中文,)现在请教是要修改哪里的编码才可以正常显示?
2-导入数据库后,crontab停止工作了,不知为何?是需要修改数据库哪里?
3-手动跑poller.php,因为老机器的rra路径和我新安装的rra路径不一样,所以手动poller的时候也显示路径找不到。我导入数据后也Rebuild Poller Cache了,但是里面显示的路径就是有问题的,这个也需要修改数据库哪里呢?

刚上手cacti,请教大家以上三个问题,多谢啦

sohusina 发表于 2013-09-01 07:51

貌似第3项与数据库没什么关系。cacti的数据库是单独的,你直接复制过来不就行了。

sohusina 发表于 2013-09-01 16:34

这里有个好的样本,可以参考
Download the latest version, and uncompress
EG cd /usr/share
EG wget http://www.cacti.net/downloads/cacti-0.8.7i.tar.gz
EG tar -xzvf cacti-0.8.7i.tar.gz

Update the MySQL config in the new version
EG vi cacti-0.8.7i/include/config.php

Backup your existing database
EG mysqldump -u root -p -l cacti > /home/user/cacti-v0.8.7e.mysql

Check the poller cron job, if the poller.php path is changing, add an entry for the new path (we can remove the old path once everything is working)
EG vi /etc/cron.d/cacti

Check the path that RRA's are expected to go to
Compare the $config["rra_path"] value in /include/global.php, if necessary override in /include/config.php

Check the Apache config

Switch the folders around
EG mv cacti cacti-v0.8.7e
EG mv cacti-0.8.7i cacti

Browse to your installation, and upgrade the database

Once complete go to System Utilities > View Cacti Log File, and check everything is looking OK

Remove additional path from crontab (if you added one)
页: [1]
查看完整版本: 关于cacti数据库问题,虚心请教!