http://128.226.1.61/cacti/ https://www.fosslinux.com/7527/how-to-install-and-configure-cacti-on-centos-7.htm Stop and Start the CACTI services /usr/local/bin/RestartCACTI.bashThis is not a new server do a rpm -qa | egrep 'httpd|mysql|snmp|php'
yum remove what it returns. If you have an EPEL|IUS repo move or disable it (I moved it).### disable SELinux vim /etc/sysconfig/selinuxvim /etc/sysconfig/selinux reboot ### Get the Repo that will make this all work. rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm rpm -Uvh remi-release-7.rpm yum repolist ### note that an EPEL|IUS is not listed, if it is remove or disable. ### Install the packages that are required for CACTI. yum install httpd httpd-devel systemctl start httpd yum install net-snmp net-snmp-utils net-snmp-libs rrdtool systemctl start snmpd yum install mariadb-server systemctl start mariadb mysql_secure_installation ### You will be asked a series of questions regarding the database...most are defaults yum --enablerepo=remi install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-intl php-snmp ### Do some MariaDB work mysql -u root -p MariaDB [(none)]> create database fosslinuxcacti; MariaDB [(none)]> CREATE USER 'fosslinuxuser'@'localhost' IDENTIFIED BY 'a-password-for-db'; MariaDB [(none)]> grant all privileges on fosslinuxcacti.* to fosslinuxuser@localhost ; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> quit; mysql -u root -p mysql < /usr/share/mysql/mysql_test_data_timezone.sql mysql -u root -p MariaDB [(none)]> GRANT SELECT ON mysql.time_zone_name TO fosslinuxuser@localhost; MariaDB [(none)]> flush privileges; ### Add|Modify some DB values vim /etc/my.cnf.d/server.cnf ### Add the following lines to the [mysqld] section. collation-server = utf8_general_ci init-connect='SET NAMES utf8' character-set-server = utf8 max_heap_table_size = 128M max_allowed_packet = 16777216 tmp_table_size = 64M join_buffer_size = 64M innodb_file_per_table = on innodb_buffer_pool_size = 512M innodb_doublewrite = off innodb_additional_mem_pool_size = 80M innodb_lock_wait_timeout = 50 innodb_flush_log_at_trx_commit = 2 ### retart the DB systemctl restart mariadb.service ### Install CACTI yum -y install cacti ### Import default cacti database file to the created database. cd /usr/share/doc/cacti-* ### Note the cacti version that was installed ## Import the SQL file, which will create all the tables needed for cacti mysql -u root -p fosslinuxcacti < cacti.sql ### This does not echo anything. ### Look at what was added ... mysql -u fosslinuxuser fosslinuxcacti -p Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1943 Server version: 5.5.68-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [fosslinuxcacti]> show tables; +-------------------------------------+ | Tables_in_fosslinuxcacti | +-------------------------------------+ | aggregate_graph_templates | | aggregate_graph_templates_graph | | aggregate_graph_templates_item | | aggregate_graphs | | aggregate_graphs_graph_item | | aggregate_graphs_items | | automation_devices | | automation_graph_rule_items | | automation_graph_rules | | automation_ips | | automation_match_rule_items | | automation_networks | | automation_processes | | automation_snmp | | automation_snmp_items | | automation_templates | | automation_tree_rule_items | | automation_tree_rules | | cdef | | cdef_items | | color_template_items | | color_templates | | colors | | data_debug | | data_input | | data_input_data | | data_input_fields | | data_local | | data_source_profiles | | data_source_profiles_cf | | data_source_profiles_rra | | data_source_purge_action | | data_source_purge_temp | | data_source_stats_daily | | data_source_stats_hourly | | data_source_stats_hourly_cache | | data_source_stats_hourly_last | | data_source_stats_monthly | | data_source_stats_weekly | | data_source_stats_yearly | | data_template | | data_template_data | | data_template_rrd | | external_links | | graph_local | | graph_template_input | | graph_template_input_defs | | graph_templates | | graph_templates_gprint | | graph_templates_graph | | graph_templates_item | | graph_tree | | graph_tree_items | | host | | host_graph | | host_snmp_cache | | host_snmp_query | | host_template | | host_template_graph | | host_template_snmp_query | | plugin_config | | plugin_db_changes | | plugin_hooks | | plugin_realms | | poller | | poller_command | | poller_data_template_field_mappings | | poller_item | | poller_output | | poller_output_boost | | poller_output_boost_processes | | poller_output_realtime | | poller_reindex | | poller_resource_cache | | poller_time | | processes | | reports | | reports_items | | sessions | | settings | | settings_tree | | settings_user | | settings_user_group | | sites | | snmp_query | | snmp_query_graph | | snmp_query_graph_rrd | | snmp_query_graph_rrd_sv | | snmp_query_graph_sv | | snmpagent_cache | | snmpagent_cache_notifications | | snmpagent_cache_textual_conventions | | snmpagent_managers | | snmpagent_managers_notifications | | snmpagent_mibs | | snmpagent_notifications_log | | user_auth | | user_auth_cache | | user_auth_group | | user_auth_group_members | | user_auth_group_perms | | user_auth_group_realm | | user_auth_perms | | user_auth_realm | | user_domains | | user_domains_ldap | | user_log | | vdef | | vdef_items | | version | +-------------------------------------+ 110 rows in set (0.00 sec) MariaDB [fosslinuxcacti]> quit; ### Modify database details. vim /usr/share/cacti/include/config.php $database_type = 'mysql'; $database_default = 'fosslinuxcacti'; $database_hostname = 'localhost'; $database_username = 'fosslinuxuser'; $database_password = 'C345gDvfr@#231'; $database_port = '3306'; $database_ssl = false; ### Set the crontab job vim /etc/cron.d/cacti # Uncomment the following line. */5 * * * * apache /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1 ### Configure Apache for CACTI vim /etc/httpd/conf.d/cacti.conf Change “Require host localhost” to “Require all granted” and “Allow from localhost” to “Allow from all.” ###Change Time Zone. vim /etc/php.ini date.timezone = america/new_york ### Restart all the related CACTI services systemctl restart httpd.service systemctl restart mariadb.service systemctl restart snmpd.service ### Start CACTI - admin admin - change the pw. ### A few settings in these files will be changed ... /etc/php.ini /etc/my.cnf.d/server.cnf /etc/my.cnf And tailoring for how it will be used. http://champange.binghamton.edu/cacti/Because the server had mysql|httpd|snmpt|php already on it there were many 3 steps forward 2 steps back...
yum remove mysql-community-libs-5.6.30-2.el7.x86_64 mysql-community-common-5.6.30-2.el7.x86_64 php74-mysqlnd-7.4.21-1.el7.ius.x86_64 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm rpm -Uvh remi-release-7.rpm yum repolist yum search httpd yum provides httpd yum install httpd httpd-devel systemctl start httpd systemctl status httpd.service yum remove httpd httpd-devel yum install httpd httpd-devel systemctl status httpd.service systemctl start httpd systemctl status httpd.service yum install net-snmp net-snmp-utils net-snmp-libs rrdtool systemctl start snmpd systemctl status snmpd yum install mariadb-server systemctl start mariadb systemctl status mariadb mysql_secure_installation cd /var/log/mariadb/ ls -ltr cat mariadb.log yum remove mariadb-server yum install mariadb-server systemctl start mariadb mysql_secure_installation yum --enablerepo=remi install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-intl php-snmp yum repolist yum --disablerepo=ius cd /etc/yu.repos.d cd /etc/yum.repos.d ls -l mkdir NIU mv ius* NIU yum update yum clean all rm -rf /var/cache/yum ls -ld /var/lib/rpm/__db.00* rm -rf /var/lib/rpm/__db.00* yum makecache yum --enablerepo=remi install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-intl php-snmp rpm -qa | egrep php74 yum remove php74* yum --enablerepo=remi install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-intl php-snmp mysql -u root -p mysql -u root -p mysql < /usr/share/mysql/mysql_test_data_timezone.sql mysql -u root -p vim /etc/my.cnf.d/server.cnf systemctl restart mariadb.service systemctl status mariadb.service yum -y install cacti rpm -qa | egrep php-common rpm -qa | egrep php-ldap yum install php-ldap yum -qa | egrep php rpm -qa | egrep php yum remove php * yum remove php* yum --enablerepo=remi install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-intl php-snmp yum --enablerepo=remi install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-intl php-snmp php-ldapyum --enablerepo=remi install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-intl php-snmp yum --enablerepo=remi install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-intl php-snmp php-ldapyum --enablerepo=remi install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-intl php-snmp cacti N yum --enablerepo=remi install php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli php-intl php-snmp php-ldap cacti cd /usr/share/doc/cacti-1.1.38 cd /usr/share/doc/cacti-1.2.15/ ls -l mysql -u root -p fosslinuxcacti < cacti.sql mysql -u root -p vim /usr/share/cacti/include/config.php vim /etc/cron.d/cacti vim /etc/httpd/conf.d/cacti.conf vim /etc/php.ini systemctl restart httpd.service systemctl restart mariadb.service systemctl restart snmpd.service cat /etc/hosts systemctl stop httpd systemctl stop mariadb systemctl stop snmpd systemctl start httpd systemctl start mariadb systemctl start snmpd mysql -u fosslinuxuser -p mysql -u fosslinuxuser fosslinuxcacti -p mysql -u fosslinuxusr -p c----- mysql -u fosslinuxusr -pc-----B mysql -u fosslinuxusr -p mysql -u root -p mysql -u root -p mysql -u fosslinuxusr -p mysql -u fosslinuxcacti -p mysql -u fosslinuxusr -p