一、升级cacti
1、官方升级文档,没有什么问题
2、Backup the old Cacti database.
shell> mysqldump -l --add-drop-table 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.
3、Backup the old Cacti directory.
shell> mv cacti cacti_old
4、Extract the distribution tarball.
shell> tar xzvf cacti-version.tar.gz
5、Rename the new Cacti directory to match the old one.
shell> mv cacti-version cacti
6、Edit include/config.php and specify the MySQL user, password and database for your Cacti configuration.
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cacti";
7、Copy the *.rrd files from the old Cacti directory.
shell> cp cacti_old/rra/* cacti/rra/
8、Copy any relevant custom scripts from the old Cacti directory. Some script are updated between versions. Therefore, make sure you only over
write if the scripts either don't exist or are newer than the distribution's.
shell> cp -u cacti_old/scripts/* cacti/scripts/
9、Copy any relevant custom resource XML files from the old Cacti directory. Some resource XML files are updated between versions. Therefore, make sure you only over write if the XML files either don't exist or are newer than the distribution's.
shell> cp -u -R cacti_old/resource/* cacti/resource/
10、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.
shell> chown -R cactiuser rra/ log/
(Enter a valid username for cactiuser, this user will also be used in the next step for data gathering.)
11、Point your web browser to:
Follow the on-screen instructions so your database can be updated to the new version.
二、升级spine(其实,说重新安装spine比较合适)
http://wmunguiam.blogspot.com/2009/01/howto-install-spine-engine-for-cacti.html
1、mv /usr/local/spine /usr/local/spine.old
2、tar -xvzf cacti-spine-0.8.7c.tar.gz
3、看一下目录里的INSTALL文档
4、执行下面的命令(为什么要执行?上面去看INSTALL文档)
aclocal
libtoolize --force
autoconf
autoheader
automake
chmod u+x configure
./configure --prefix=/usr/local/spine --with-mysql=/usr/local/mysql --with-snmp=/usr/local/net-snmp
make
make install
cd /usr/local/spine/etc
cp spine.conf.dist spine.conf
修改spine.conf里关于数据库连接的配置
5、登陆cacti,查看下面的spine路径是否正确
console-->Configuration-->Settings-->Paths-->Spine Poller File Path
三、升级完成。