CentOS7 Cacti Virtual Appliance Upgrade commands

Here is a list of steps for upgrading my Cacti virtual appliance in place retaining all data. This will only work on the Centos7_Cacti-v1.1.6 or greater. This assumes you are still using the original Cacti user, passwords, and paths.

If there are any questions, please use GitHub Issues, and I can assist and update as needed.

 [Update 12/4/2018]

It turns out there has been some development in Smokeping after almost 4 years of quiet! New v2.7.2 is available, so I created a new Smokeping update routine and added it to the script. This will check if you have Smokeping installed, and offer to upgrade if you wish. This can be run via the same routine as the Cacti upgrade from Github below.

[UPDATE 11-28-2018]

I have a first working version of an automated update routine for the cacti-template you can get here. You can get the instructions on how to run it here…


#This is for use in the Cacti Virtual Appliance CentOS7_Cacti-v1.1.0 or greater

sudo su

#Best to backup Cacti DB before upgrading
mysqldump –user=cacti –password=cacti -l –add-drop-table cacti |gzip > mysql.cacti_$(date +\%Y\%m\%d).sql.gz

#Begin Cacti upgrade
cd /var/www/html
#Find & Relpace any entries with the new Cacti version upgrading to. Ex 1.1.2 to 1.1.4
wget http://www.cacti.net/downloads/cacti-1.1.4.tar.gz

tar xzvf cacti-1.*.tar.gz
#Optional – Cleanup download file
rm cacti-1.*.tar.gz

rm cacti

#Change line below to OLD version of cacti you are coming FROM.
mv cacti-1.1.2/ cacti_old/

ln -f -s cacti-1.1.4 cacti

#Edit Cacti config file
#Change the lines with ‘cactiuser’ to ‘cacti’
vi cacti/include/config.php

rm -rf cacti/rra/
mv cacti_old/rra/ cacti-1.1.4/

cp -u -R cacti_old/plugins/* cacti/plugins/
cp -u -R cacti_old/scripts/* cacti/scripts/
cp -u -R cacti_old/resource/* cacti/resource/

mkdir cacti/config_backups

cd cacti
chown -R cacti:users resource/ scripts/ rra/ log/ plugins/ images/ include/
chown apache:apache cache/realtime
chgrp apache log/cacti.log

cd ..

#Optional – cleanup old folder
rm -rf cacti_old/

#Optional but recommended – Upgrade Spine
cd ~
wget http://www.cacti.net/downloads/spine/cacti-spine-1.1.4.tar.gz
tar xvzf cacti-spine-*.tar.gz
rm cacti-spine-*.tar.gz
cd cacti-spine-*
sudo make install
rm -rf cacti-spine-*
sudo su
cd /usr/local/spine/bin
chown root:root spine;chmod +s spine