CentOS下Zabbix Server 安装

Zabbix Server 安装

信息

  • Author: rootming
  • Date: 2018/10/31

ChangeLog

说明

  1. 以下文档在CentOS 7操作
  2. 使用 # 说明代表root用户执行, $ 为普通用户, 其他命令提示符根据使用的软件决定

认证信息

系统 & 数据库

系统

  • username: root
  • password: 密码

数据库

  • username: root
  • password: 密码

  • username: zabbix
  • password: 密码

安装Zabbix

安装软件包

#yum update
#yum install mariadb-server
#systemctl enable mariadb
#systemctl start mariadb
#rpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
#yum install zabbix-server-mysql
#yum install zabbix-web-mysql

设置数据库

完成数据库安装操作

#mysql_secure_installation
#mysql -u root -p

设置数据库用户 & 创建数据库

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> create user 'zabbix'@'localhost' identified by '密码';
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by '密码';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> quit;

创建表结构 & 导入初始化数据

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

设置zabbix数据库设置

#vi /etc/zabbix/zabbix_server.conf

##设置为以下值
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=密码

设置Zabbix Server

配置PHP

#vim /etc/php.ini
#修改date.timezone = Asia/Shanghai

重新启动Apache

#systemctl restart httpd

启动Zabbix Server

#systemctl enable zabbix-server
#systemctl start zabbix-server

配置Zabbix Server

#浏览器访问http://域名:端口/zabbix
#设置对应信息

猜你喜欢

转载自www.cnblogs.com/rootming/p/10854336.html