centos7.2 安裝zabbix3.0詳解


關閉防火牆:

systemctl stop firewalld.service

systemctl disable firewalld.service 

關閉selinux:

[root@localhost ~]# setenforce 0 

[root@localhost ~]# sed -i'/SELINUX/s/enforcing/disabled/' /etc/selinux/config  

配置yun源

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

安裝服務器端包

yum install -y zabbix-server-MySQL  zabbix-web-mysql  zabbix-agent  mariadb-server

 

啓動mariadb

systemctl start mariadb

systemctl enable mariadb

 

創建zabbix數據庫

mysql -uroot -p
Enter password:                  ##輸入MySQL密碼,默認爲空  

create database zabbix character set utf8 collate utf8_bin;
##創建數據庫zabbix,並且數據庫編碼使用utf8

grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix2016';
##允許賬戶能從本機連接至數據庫zabbix
quit;

 

導入初始模式和數據

cd /usr/share/doc/zabbix-server-mysql-3.0.6/

zcat create.sql.gz |mysql -uroot zabbix

 

vim /etc/zabbix/zabbix_server.conf

91:DBName=zabbix

107:DBUser=zabbix

116:DBPassword=zabbix2016

 

systemctl start zabbix-server

systemctl enable zabbix-server

 

vim /etc/httpd/conf.d/zabbix.conf

        php_valuemax_execution_time 300

        php_valuememory_limit 128M

        php_valuepost_max_size 16M

        php_valueupload_max_filesize 2M

        php_valuemax_input_time 300

        php_valuealways_populate_raw_post_data -1

        #php_value date.timezone Europe/Riga

        php_valuedate.timezone Asia/Shanghai

 

systemctl start httpd.service

systemctl enable httpd.service

http://ip地址/zabbix/setup.php


安裝和配置客戶端

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

yum -y install zabbix-agent

vim /etc/zabbix/zabbix_agentd.conf

Server=zabbix-server-ip

systemctl enable zabbix-agent

systemctl start zabbix-agent

 

wKiom1hQ94vj2iTNAABZpJvm38g825.png-wh_50

wKioL1hQ95rws3PEAACPphsKANk092.png-wh_50

wKiom1hQ95qA7XyRAACAz57ZH8A692.png-wh_50

wKiom1hQ95uy7sBhAABf-XRawUA668.png-wh_50

wKioL1hQ95vxrZK1AAB_PsrA7aw619.png-wh_50

wKioL1hQ95vQV4IwAABcBQaq_x0426.png-wh_50

wKiom1hQ95zBWPMbAABNCT5pynE966.png-wh_50

wKiom1hQ-AGj70A2AACeFWzPjso266.jpg-wh_50


zabbix3.0中文顯示亂碼的問題解決辦法


[root@zabbix-server include]# pwd
/usr/share/zabbix/include
[root@zabbix-server include]# vi defines.inc.php
#修改第93行
define('ZBX_FONT_NAME','msyh');
#修改第45行改爲
define('ZBX_GRAPH_FONT_NAME','msyh')
然後下載微軟雅黑字體,改名爲msyh傳入 /usr/share/zabbix/fonts目錄下即可

wKiom1hQ-GjSetQkAAL9b6lshj8993.png-wh_50

wKioL1hQ-GmRRiR1AALv5MHcruw313.png-wh_50




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章