Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Jul 20, 2018 1:41 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Trouble setting up Cacti's DB.
PostPosted: Thu Apr 19, 2018 1:14 pm 
Offline

Joined: Thu Apr 19, 2018 1:08 pm
Posts: 29
So I'm loading Cacti on RHEL 7, and I followed this howto
https://www.tecmint.com/install-cacti-network-monitoring-on-rhel-centos-6-3-5-8-and-fedora-17-12/

Initially I got an error about the TimeZone DB, and the PHP timezone not being set, but I was able to google and resolve those.
Now I'm seeing some errors about the DB's environment variables.

I've edited the etc/my.cnf file to add the following, as there are the ones the cacti setup page is having issue with. (Well and the DB version being MariaDB 5.5.56 (but that's the version in the RHEL repo's)

collation_server=utf8_general_ci
character_set_client=utf8
max_heap_table_size=512M
max_allowed_packet=16777216
tmp_table_size=128M
join_buffer_size=128M
innodb_file_per_table=ON
innodb_buffer_pool_size=1024M
innodb_doublewrite=OFF
innodb_additional_mem_pool_size=128M
innodb_additional_mem_pool_size=2

So after adding these lines to the my.cnf file and then running "systemctl restart MariaDB" it's still giving the same errors.


Top
 Profile  
 
 Post subject: Re: Trouble setting up Cacti's DB.
PostPosted: Fri Apr 20, 2018 6:14 am 
Offline

Joined: Wed Mar 01, 2017 2:34 pm
Posts: 45
The my.cnf file is an ini-style configuration file, and you have to put the configuration into the correct section. Easiest on CentOS 7 is to not edit any of the default configuration files at all but throw your own changes into a new file in the /etc/my.cnf.d directory. This way, there is no problem on rpm updates of the default config files.
Attached to this post is mine for a tiny server configuration (rename to *.cnf).

Review before using it. You may probably remove character-set-server=..., change the binding if your server should be reachable from remote, and may change/remove innodb_file_per_table and innodb_file_format.


Attachments:
server-mail.cnf.txt [1.32 KiB]
Downloaded 17 times
Top
 Profile  
 
 Post subject: Re: Trouble setting up Cacti's DB.
PostPosted: Fri Apr 20, 2018 7:22 am 
Offline
Cacti User
User avatar

Joined: Fri Feb 10, 2017 2:45 pm
Posts: 133
Location: Long Island, New York, USA
Make sure your entries are after the '[mysqld]' tag, but before any other tags. Here's mine:

[[email protected]*******]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

max_heap_table_size = 186M
max_allowed_packet = 16777216
tmp_table_size = 64M
join_buffer_size = 64M
innodb_file_per_table = ON
innodb_buffer_pool_size = 926M
innodb_doublewrite = OFF
innodb_additional_mem_pool_size = 80M
innodb_lock_wait_timeout = 50
innodb_flush_log_at_trx_commit = 2

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

[[email protected]*******]#

_________________
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Cacti 1.1.37
CentOS 7.4


Top
 Profile  
 
 Post subject: Re: Trouble setting up Cacti's DB.
PostPosted: Fri Apr 20, 2018 8:36 am 
Offline

Joined: Thu Apr 19, 2018 1:08 pm
Posts: 29
Thanks that seems to have had an effect, though it hasn't fully resolved things. (IE not the DB won't start) This is at least progress, I'll try commenting out each line till it starts.

Here's what I have now (Previously I had the variables just before the include.)

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

collation_server=utf8_general_ci
character_set_client=utf8
max_heap_table_size=512M
max_allowed_packet=16777216
tmp_table_size=128M
join_buffer_size=128M
innodb_file_per_table=ON
innodb_buffer_pool_size=1024M
innodb_doublewrite=OFF
innodb_additional_mem_pool_size=128M
innodb_additional_mem_pool_size=2

[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d


Top
 Profile  
 
 Post subject: Re: Trouble setting up Cacti's DB.
PostPosted: Fri Apr 20, 2018 8:43 am 
Offline

Joined: Thu Apr 19, 2018 1:08 pm
Posts: 29
Ok so I commented out the first one (the collation_server one) and it started.

I guess that one isn't really that important (though IMO it'd be nice)

Also it looks like the last two aren't taking effect, the cacti install page still shows them at their default values.
As well as the character_set_client variable.

Ok I found a copy/paste error so now the innodb parts are good.


Top
 Profile  
 
 Post subject: Re: Trouble setting up Cacti's DB.
PostPosted: Fri Apr 20, 2018 9:03 am 
Offline

Joined: Thu Apr 19, 2018 1:08 pm
Posts: 29
Ok it seems to have cleared by adding "character_set_server = utf8"


Top
 Profile  
 
 Post subject: Re: Trouble setting up Cacti's DB.
PostPosted: Fri Apr 20, 2018 9:16 am 
Offline

Joined: Thu Apr 19, 2018 1:08 pm
Posts: 29
Ok, so I have that screen good (other than the DB ver, but as I said I like to stary with the repos.)

Now on the file location screen I have an error about spine binary location, that field wasn't even in the screen shots from the how to I read.
Is this package in a repo?


Top
 Profile  
 
 Post subject: Re: Trouble setting up Cacti's DB.
PostPosted: Fri Apr 20, 2018 9:37 am 
Offline

Joined: Thu Apr 19, 2018 1:08 pm
Posts: 29
After some searching I found the lux repo, I added it but it seems the RPM for loading it has some issues so I edited the repo file and disabled it till I can sort it out.

for now I installed spine via "yum install http://repo.iotti.biz/CentOS/7/x86_64/c ... x86_64.rpm"
I'd rather it be linked to a repo so that it'll be updated when I run yum update, but this will work for now.


Top
 Profile  
 
 Post subject: Re: Trouble setting up Cacti's DB.
PostPosted: Fri Apr 20, 2018 12:55 pm 
Offline
Cacti User
User avatar

Joined: Fri Feb 10, 2017 2:45 pm
Posts: 133
Location: Long Island, New York, USA
Glad you got it sorted out. I ignored the spine directory error since I'm not using it.

_________________
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Cacti 1.1.37
CentOS 7.4


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group