centos7部署zabbix3.4
前言
大家好, zabbix作为分布式自动化监控系统,已经非常成熟,在生产环境中的应用也颇为广泛,本人就自己的部署过程做个分享,主要以zabbix3.4版本的部署为例,这是我第一篇文章分享,请大家多多支持,如有不足,请大家多担待。。。。
废话不多说,直接上干货。
一,系统环境
1.查看系统环境
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@localhost ~]# sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/’ /etc/selinux/config
[root@localhost ~]# grep SELINUX=disabled /etc/selinux/config
SELINUX=disabled
[root@localhost ~]# setenforce 0
2. 安装并启动httpd
[root@localhost ~]# yum install httpd httpd-devel -y
[root@localhost ~]# rpm -qa |grep httpd
httpd-tools-2.4.6-67.el7.centos.6.x86_64
httpd-2.4.6-67.el7.centos.6.x86_64
httpd-devel-2.4.6-67.el7.centos.6.x86_64
[root@localhost ~]# systemctl enable httpd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@localhost ~]# systemctl start httpd.service
二,数据库的安装与配置
1.安装与查看
[root@localhost ~]# yum install mariadb-server mariadb mariadb-devel mariadb-test -y
[root@localhost ~]# rpm -qa |grep maria
mariadb-libs-5.5.56-2.el7.x86_64
mariadb-5.5.56-2.el7.x86_64
mariadb-server-5.5.56-2.el7.x86_64
mariadb-test-5.5.56-2.el7.x86_64
mariadb-devel-5.5.56-2.el7.x86_64
2.数据库相关命令
mariadb数据库的相关命令是:
systemctl start mariadb #启动MariaDB
systemctl stop mariadb #停止MariaDB
systemctl restart mariadb #重启MariaDB
systemctl enable mariadb #设置开机启动
[root@localhost ~]# systemctl start mariadb
[root@localhost ~]# systemctl stop mariadb
[root@localhost ~]# systemctl restart mariadb
[root@localhost ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
三、Zabbix3.4安装及配置
1、安装zabbix最新版epel源:
[root@localhost ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/