ลิงค์การติดตั้ง Cacti https://sulkiflee-n.blogspot.com/2019/05/cacti-monitoring-ubuntu-1604.html
1.Install needed package
#apt-get install php-ldap php-gd
Backup Database
#mysqldump -l -ucacti -pPassword –add-drop-table cacti > mysql.cacti
#mysqldump -l -ucacti -pPassword –add-drop-table cacti > mysql.cacti
2.Download and Prepare Cacti Installation# wget https://www.cacti.net/downloads/cacti-latest.tar.gz# tar xfz cacti-latest.tar.gz
3.Backup the Old Cacti#mv /usr/share/cacti/site /usr/share/cacti/site_old
4.Replace with the New Cacti
#mv cacti-1.2.3 /usr/share/cacti/site
#mv cacti-1.2.3 /usr/share/cacti/site
5.Copy Needed Scripts, Resource, and Graphs
#cp -u -R /usr/share/cacti/site_old/scripts/* /usr/share/cacti/site/scripts#cp -u -R /usr/share/cacti/site_old/resource/* /usr/share/cacti/site/resource/
#cp /var/lib/cacti/rra/* /usr/share/cacti/site/rra/ #Doesn’t work
#chmod 777 rra/*
#mv /usr/share/cacti/site/rra /usr/share/cacti/site/rra_old
#ln -s /var/lib/cacti/rra /usr/share/cacti/site/rra
6.Modify the Cacti Configuration File to Connect Database#nano /usr/share/cacti/site/include/config.php
$database_type = ‘mysql’;
$database_default = ‘cacti’;
$database_hostname = ‘localhost’;
$database_username = ‘cacti’;
$database_password = ‘Password’;
$database_port = ‘3306’;
$database_ssl = false;
$database_default = ‘cacti’;
$database_hostname = ‘localhost’;
$database_username = ‘cacti’;
$database_password = ‘Password’;
$database_port = ‘3306’;
$database_ssl = false;
7.Create TimeZone Table in Database
#mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -uroot -pPassword mysql
Modify the TimeZone configuration for Apache
#nano /etc/php/7.0/apache2/php.ini
#nano /etc/php/7.0/apache2/php.ini
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = “Asia/Bangkok”
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = “Asia/Bangkok”
แก้ timezone#pico /etc/php/7.0/cli/php.ini"Asia/Bangkok"
8.Restart Apache Service
#systemctl start apache2.service
#systemctl start apache2.service
#Visit the Web Page to Finish the Upgrade
แก้ในขั้นตอนการอัพเกรดinnodb_flush_log_at_timeout =3
innodb_read_io_threads =32
innodb_write_io_threads =16
innodb_buffer_pool_instances =9
innodb_io_capacity 200 =5000
innodb_io_capacity_max =10000
เว็บอ้างอิง https://www.chenyiting.com/2018/04/04/upgrade-cacti-0-8-8-to-1-1-37/