(一)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 install mariadb-server mariadb -y 
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 install zabbix-server-mysql zabbix-web-mysql -y
  • 创建数据库和用户名,授权,执行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,调整英文为中文

  • 设置前端有故障发送报警声音

posted @ 2018-04-19 18:44  你很棒  阅读(173)  评论(0编辑  收藏  举报