mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
mysql --user root --password mysql
###Enter your mysql root password.###This will enter you into the mysql console for mysql database.###NOTE: ‘somepassword’ referenced here is the cacti user password and must be the same as used in cacti configuration in the next sectionmysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'somepassword';mysql> GRANT SELECT ON mysql.time_zone_name TO cacti@localhost IDENTIFIED BY 'somepassword';Exit
## cacti config 수정
vi /opt/cacti/include/config.php
### Find these variables and make the following changes$database_type = 'mysql';$database_default = 'cacti';$database_hostname = 'localhost';$database_username = 'cactiuser';$database_password = somepassword;$database_port = '3306';$database_ssl = false;$url_path = '';
###Add line at bottom*/5 * * * * www-data php /opt/cacti/poller.php > /dev/null 2>&1
## MySQL my.cnf 튜닝
vi /etc/mysql/mysql.conf.d/mysqld.cnf
###Add following lines to the bottom of the configuration file:Max_heap_table_size = 256MTmp_table_size = 64MJoin_buffer_size = 64M
Innodb_doublewrite = OFFInnodb_buffer_pool_size = 963MInnodb_flush_log_at_timeout = 3Innodb_read_io_threads = 32Innodb_write_io_threads = 16
/etc/init.d/apache2 restart
/etc/init.d/mysql restart
***** 여기까지 했지만 cacti server IP 접근을 해도 500 error 만 나오고 정상적으로 열리지 않았다.
RECENT COMMENT