[Up]常用資訊

[重點文章] 重點文章 [重點文章] 重點文章

2020年7月14日 星期二

[Debian] Zabbix 5.0 安裝

[Debian] Zabbix 5.0 安裝

 
#Step: 01 –Zabbix 5.0 安裝
新版安裝要注意一些事項


a. Install Zabbix repository

# wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1+buster_all.deb
# dpkg -i zabbix-release_5.0-1+buster_all.deb
# apt update


# apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent

# apt -y install mariadb-server mariadb-client


# mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;

# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix


修改檔案 /etc/zabbix/zabbix_server.conf

DBPassword=password


修改 php時區  /etc/zabbix/apache.conf,

# php_value date.timezone Europe/Riga


啟動
# systemctl restart zabbix-server zabbix-agent apache2
# systemctl enable zabbix-server zabbix-agent apache2

安裝 zabbix proxy
更新步驟還是需要

apt -y install zabbix-proxy-mysql zabbix-agent

配置mysql
shell> mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to [email protected] identified by 'zabbix';
mysql> quit;


匯入資料表
zcat /usr/share/doc/zabbix-proxy-mysql/schema.sql.gz | mysql -u zabbix -p zabbix zabbix
 
修改配置檔案
# vi /etc/zabbix/zabbix_proxy.conf
Server=1.1.1.1    
Hostname=zabbix-proxy-query
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
ConfigFrequency=40
DataSenderFrequency=5    #重要

重啟服務
/etc/init.d/zabbix-proxy restart
update-rc.d zabbix-proxy defaults

其他
modify /sys db provision.tomcat.extramb value 1024

tmsh restart sys service tomcat


watch -n 1 'top -cbn 1 | grep tomcat'

top -cbn 1



沒有留言:

張貼留言