centos7下yum安装zabbix

一、前提环境LAMP

1、安装apache 

  yum install -y httpd 

  启动服务

  systemctl start httpd.service

2、安装mysql

  下载安装mysql官方的yum repository

  wget -i -c http://dev.mysql.com/get/mysql157-community-release-el7-10.noarch.rpm

  yum install -y mysql157-community-release-el7-10.noarch.rpm

  安装mysql服务器

  yum install -y mysql-community-server

  启动服务

  systemctl start mysqld.service

3、安装php

  yum install -y php php-mysql

 

二、安装zabbix

 1下载包

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

2安装包

yum install -y zabbix-server-mysql zabbix-get zabbix-web zabbix-web-mysql zabbix-agent zabbix-sender

3进入mysql配置zabbix库
mysql>create database zabbix character set utf8 collate utf8_bin;
mysql>grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql>flush privileges;

4解压zabbix表
cd /usr/share/doc/zabbix-server-mysql-3.4.9/

gunzip create.sql.gz

5在/usr/share/doc/zabbix-server-mysql-3.4.9/目录下再进入mysql导入zabbix表
mysql>use zabbix;
mysql>source create.sql;

6配置zabbix-server配置文件

vi /etc/zabbix/zabbix_server.conf

  添加以下配置:

  DBHost=localhost
  DBName=zabbix
  DBUser=zabbix
  DBPassword=zabbix
  DBSocket=/var/lib/mysql/mysql.sock

7启动服务

systemctl start zabbix-server.service


8打开浏览器输入Ip/zabbix设置web
一路点下一步,最后账户Admin,密码zabbix


web设置问题详见:https://www.cnblogs.com/Sungeek/p/9069999.html#sg3


  

 

 

posted @ 2019-05-25 17:16  peace_ping  阅读(1658)  评论(0编辑  收藏  举报