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…

https://github.com/KnoAll/cacti-template


#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-*
./configure
make
sudo make install
rm -rf cacti-spine-*
sudo su
cd /usr/local/spine/bin
chown root:root spine;chmod +s spine

22 thoughts on “CentOS7 Cacti Virtual Appliance Upgrade commands”

  1. After some new development on Smokeping to v2.7.2 I created a Smokeping upgrade script for the template and added it to the cacti routine. You can check it out at the Github link.

  2. I have tried all of the usernames and password combinations from your site and cacti.net and I am having issues logging into the web interface. Can someone please pass along the username/password for the .ova install of 1.1.37?

  3. Hello
    Thank you for the great work!
    cati works. but when i change the timezone to CET the cacti wil not update anymore…
    ln –s /usr/share/zoneinfo/CET /etc/localtime
    That can I do?
    Thank you!

  4. You should follow the instructions for upgrading Spine. The 1.1.4v of the appliance did not have the current version which was causing some issues.

  5. Running into issue and reapply all chown and chmod command from above …
    Graph doesn’t load .. I have install ova 1.1.4
    RRDTool Says:
    ERROR: opening ‘/var/www/html/cacti-1.1.4/rra/4/36.rrd’: No such file or directory

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.