在CentOS 7上使用Yum源安装 Zabbix 3.2
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在CentOS 7上使用Yum源安装 Zabbix 3.2相关的知识,希望对你有一定的参考价值。
在CentOS 7上使用Yum源安装 Zabbix 3.2
1. 环境准备
[[email protected] ~]# setenforce 0 [[email protected] ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config [[email protected] ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [[email protected] ~]# yum install epel-release.noarch wget vim gcc gcc-c++ lsof chrony tree nmap unzip rsync -y [[email protected] ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
2. LAMP安装
[[email protected] ~]# yum install httpd mariadb mariadb-server mariadb-client php php-mysql [[email protected] ~]# systemctl start mariadb
3. Zabbix安装
[[email protected] ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm [[email protected] ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX [[email protected] ~]# yum install zabbix-server-mysql zabbix-web-mysql zabbix-get zabbix-agent
4. 创建数据库
[[email protected] ~]#mysqladmin -u root password [email protected]#123 [[email protected] ~]# mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE zabbix DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; MariaDB [(none)]> GRANT ALL ON zabbix.* TO ‘zabbix‘@‘%‘ IDENTIFIED BY ‘zabbix‘; MariaDB [(none)]> GRANT ALL ON zabbix.* TO ‘zabbix‘@‘localhost‘ IDENTIFIED BY ‘zabbix‘; MariaDB [(none)]> flush privileges; MariaDB [(none)]> quit
5. 导入数据
[[email protected] ~]# cd /usr/share/doc/zabbix-server-mysql-3.2.0/ [[email protected] zabbix-server-mysql-3.2.0]# zcat create.sql.gz | mysql -uroot -p zabbix [[email protected] zabbix-server-mysql-3.2.0]# cd ~
6. 修改配置
[[email protected] ~]# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
[[email protected] ~]# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Chongqing
7. 启动
[[email protected] ~]# systemctl start httpd [[email protected] ~]# systemctl start zabbix-server [[email protected] ~]# systemctl start zabbix-agent
8. 通过 http://ip地址/zabbix配置
访问默认用户名/密码:Admin/zabbix,注意用户名也区分大小写
本文出自 “SQL Server Deep Dive” 博客,请务必保留此出处http://ultrasql.blog.51cto.com/9591438/1926570
以上是关于在CentOS 7上使用Yum源安装 Zabbix 3.2的主要内容,如果未能解决你的问题,请参考以下文章
How to install Zabbix5.0 LTS version with Yum on the CentOS 7.8 system?