Upgrade to 1.1.6 from 0.8.8h on CentOS 6.9

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Moderators, Developers

Post Reply
Posts: 1
Joined: Thu May 19, 2016 12:06 am

Upgrade to 1.1.6 from 0.8.8h on CentOS 6.9

#1 Post by hrv231 » Mon May 22, 2017 4:31 pm

I'm seeing a lot of people having upgrade issues with Cacti from version 0.8.8h to 1.1.6 using the repository.
I will be explaining what I had to do to make this work again, because after updating cacti everything stopped working for me.
I'm using:
CentOS 6.9
kernel 2.6.32-696.1.1.el6.x86_64
Cacti 0.8.8h
MySQL 5.1.73
spine 0.8.8g

username for cacti database is cacti, a lot of people use cactiuser online

I'm writing this guy after a lot of tries going back and forth with snapshots and after a lot of research online.

1) Before updating cacti from the repository you should first update the MySQL database to at least the minimum that version 1.1.6 recommends which is 5.6

//Add MySQL repo
#vim /etc/yum.repos.d/mysql-community.repo
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-com ... $basearch/

name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-com ... $basearch/
save & exit

//Add RPM-GPG-KEY-mysql
#vim /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
//just copy and paste the GPG-KEY from this website:
save & exit

//Do a yum update and it will install mysql 5.6
#yum -y update mysql*

//After that I started seeing a lot of database issues, the database failed to start and find out that it's because of the innodb, by adding the below line in /etc/my.cnf will fix it:
#vim /etc/my.cnf
innodb_data_file_path = ibdata1:10M:autoextend

//useful commands to check that the database is running:
#service mysqld status
#service mysqld restart

//Then I ran:
#mysql_upgrade -u root -p

//And this one:
#mysqlcheck --auto-repair --databases cacti -u root -p

2) Cacti installation will complain about the TimeZone database on mysql database not being able to connect, so for that I did this:
#mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
//you will get 3 warnings but that's fine, and then run this inside the database:
#mysql -u root -p
mysql> use mysql;
mysql> GRANT SELECT ON mysql.time_zone_name TO [email protected];
mysql> flush privileges;
mysql> quit;
3) After checking that the database was running I did a repair of cacti database:
#cd /var/lib/cacti/cli
#php repair_database.php --force

4) Update cacti to version 1.1.6
#yum update

//Cacti is installed and when you open the webpage you should see the License Agreement, accept that, clic next and you will see a lot of recommended options to change in /etc/my.cnf file.
This is my complete my.cnf file:
# Disabling symbolic-links is recommended to prevent assorted security risks
max_heap_table_size = 268435456
max_allowed_packet = 67108864
tmp_table_size = 268435456
join_buffer_size = 134217728
innodb_file_per_table = ON
innodb_buffer_pool_size = 1088337920
innodb_doublewrite = OFF
innodb_additional_mem_pool_size = 83886080
innodb_flush_log_at_timeout = 3
innodb_read_io_threads = 32
innodb_write_io_threads = 16
innodb_data_file_path = ibdata1:10M:autoextend


//The only thing that I did not fix is the complain with regard to the "collation_server" and "character_set_client"
//Restart MySQL service
#service mysqld restart

//Now click Next and then the Upgrade button to upgrade Cacti.
//After it finished I restarted the httpd service and then did:
#cd /var/lib/cacti/cli
#php upgrade_database.php

//I started seeing holes in my graphs and some of the graphs were not displaying at all, so the next step was upgrading spine to the same version as Cacti.
#yum info help2man

#cd /tmp
#wget http://www.cacti.net/downloads/spine/ca ... 1.6.tar.gz
#tar -xzvf cacti-spine-1.1.6.tar.gz

//compile spine
#cd /tmp/cacti-spine-1.1.6
make install

//Check that the new version of spine is installed
#/usr/local/spine/bin/spine --version

There were some other problems that I encounter along the way with permissions but I can't remember, searching on google you will find out the answer.

Even if you upgraded cacti first and still has the old version of MySQL, I think with some test and tweaks you can make it work.


User avatar
Developer/Forum Admin
Posts: 6016
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA

Re: Upgrade to 1.1.6 from 0.8.8h on CentOS 6.9

#2 Post by rony » Thu Jul 13, 2017 9:34 pm

Appreciate the guide! Thanks!

[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]

Post Reply