所以都要倒回之前的備份
手動修改後
再做一次
這次是要把
/usr/share/cacti/install/upgrades/1_2_8.php
內的這行刪掉
db_install_execute('ALTER TABLE host_snmp_cache MODIFY COLUMN snmp_index VARCHAR(255) NOT NULL default ""');
查了一下好像目前的mariadb的版本沒辦法醬操作 要升版
今天先把mariadb升級
先保留php-5.4.16-46.1.el7_7.x86_64
下次cacti升級再看看有什麼問題
再來處理
新增以下檔案
/etc/yum.repos.d/mariadb.repo
內容如下
[mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.4/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
改好後直接 yum -y update
mariadb就會直接升了
再來要 mv /etc/my.cnf /etc/my.cnf_old 不然db會起不來
接下來照文件改
Add variables in the [mysqld] section. collation-server = utf8mb4_unicode_ci character-set-server=utf8mb4 max_heap_table_size = 64M tmp_table_size = 64M join_buffer_size = 64M innodb_file_format = Barracuda innodb_large_prefix = 1 innodb_flush_log_at_timeout = 3 innodb_buffer_pool_size = 1GB innodb_buffer_pool_instances = 10 # Based on what type for storage you use. The below values are for SSD drives. # Change it if Cacti reports issues during the installation innodb_read_io_threads = 32 innodb_write_io_threads = 16 innodb_io_capacity = 5000 innodb_io_capacity_max = 10000
db重啟就好了
再把這個補上去
ALTER TABLE host_snmp_cache MODIFY COLUMN snmp_index VARCHAR(255) NOT NULL default ""
https://www.itzgeek.com/how-tos/linux/centos-how-tos/monitor-network-using-cacti-with-centos-7-rhel-7.html
沒有留言:
張貼留言