(一)Centos7安裝zabbix3.4 server端
(1)環境准備
- 關閉firewalld和selinux
systemctl stop firewalld
systemctl disable firewalld
#sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config #setenforce 0
- centos版本
cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core)
- 安裝mariadb
yum -y install mariadb-server mariadb
systemctl start mariadb
systemctl enable mariadb
- 安裝zabbix
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm yum -y install zabbix-server-mysql zabbix-web-mysql
- 創建數據庫和用戶名,授權,執行zabbix的sql腳本
#mysql MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; MariaDB [(none)]> flush privileges; zcat /usr/share/doc/zabbix-server-mysql-3.4.8/create.sql.gz | mysql -uzabbix -pzabbix zabbix
(2)配置zabbix
- 修改數據庫密碼
cp /etc/zabbix/zabbix_server.conf{,.old} #vi /etc/zabbix/zabbix_server.conf DBPassword=zabbix
- 修改apache時區
# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
- 啟動相關服務
systemctl start zabbix-server.service systemctl enable zabbix-server.service systemctl start httpd systemctl enable httpd
- 驗證
netstat -nltp|egrep "zabbix|httpd|mysql" tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 44914/zabbix_server tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 44637/mysqld tcp6 0 0 :::80 :::* LISTEN 45022/httpd tcp6 0 0 :::10051 :::* LISTEN 44914/zabbix_server
(3)圖形界面安裝配置
http://ip:port/zabbix http://192.168.92.129/zabbix/setup.php
登陸,缺省用戶名Admin,密碼zabbix

- 配置數據庫連接

-
完成安裝

- 進入zabbix,調整英文為中文

-
設置前端有故障發送報警聲音

- 安裝zabbix-agentd
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm yum install zabbix-agent -y systemctl enable zabbix-agent.service
- agent端配置
# vim /etc/zabbix/zabbix_agentd.conf Server=192.168.92.129 #zabbix server地址 ServerActive=192.168.92.129 #zabbix server地址 或 sed -ri '/^ServerActive=127.0.0.1/cServerActive=192.168.92.129' /etc/zabbix/zabbix_agentd.conf sed -ri '/^Server=127.0.0.1/cServer=192.168.92.129' /etc/zabbix/zabbix_agentd.conf
- 重啟agent服務
systemctl start zabbix-agent.service
