Chinaunix首页 | 论坛 | 博客
  • 博客访问: 35074
  • 博文数量: 11
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 115
  • 用 户 组: 普通用户
  • 注册时间: 2020-07-02 11:22
文章分类

全部博文(11)

分类: LINUX

2020-07-14 15:47:58

一、环境
系统安装镜像:CentOS-7-x86_64-DVD-1908.iso安装时选为精简系统

下载zabbix yum源文件
rpm -ivh

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

# systemctl start mariadb
# mysql \
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>create user zabbix@localhost identified by 'zabbix';
Query OK, 0 rows affected (0.01 sec)
MariaDB [(none)]>grant all privileges on zabbix.* to zabbix@localhost;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> quit
Bye
[root@localhost ~]# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
Enter password:
[root@localhost ~]#

d. 为Zabbix server配置数据库

编辑配置文件 /etc/zabbix/zabbix_server.conf

DBPassword=password
e. 为Zabbix前端配置PHP

编辑配置文件 /etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.

# php_value date.timezone Europe/Riga
f. 启动Zabbix server和agent进程

启动Zabbix server和agent进程,并为它们设置开机自启:

# systemctl restart zabbix-server zabbix-agent httpd
# systemctl enable zabbix-server zabbix-agent httpd 防火墙关闭
systemctl stop firewalld.service



阅读(1177) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~