zabbix安装部署、三分钟分钟部署zabbix监控(超详细)

zabbix安装部署

  • 1,快速安装部署zabbix
  • 2,一键脚本安装zabbix

1,快速安装部署zabbix

1,关闭防火墙,selinux

systemctl stop firewalld
systemctl disable firewalld
setenforce 0  #临时
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config 

2,安装zabbix储存库(zabbix源)

rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo

vi /etc/yum.repos.d/zabbix.repo
[zabbix-frontend]
name=Zabbix Official Repository frontend - $basearch
baseurl=http://repo.zabbix.com/zabbix/5.0/rhel/7/$basearch/frontend
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

yum clean all

3,安装zabbix server ,agent

yum -y install zabbix-agent-5.0.28-1.el7.x86_64 zabbix-server-mysql-5.0.28-1.el7.x86_64
wget http://www.percona.com/redir/downloads/Percona-XtraDB-Cluster/5.5.37-25.10/RPM/rhel6/x86_64/Percona-XtraDB-Cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm
rpm -ivh Percona-XtraDB-Cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm

4,安装SCL储存库、zabbix web前端、监控web
启用Red Hat软件集合
SCL(Software Collections)可以让你在同一个操作系统上安装和使用多个版本的软件,而不会影响整个系统的安装包

yum -y install centos-release-scl
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl
#修改配置文件
vim /etc/zabbix/zabbix_server.conf 
DBPassword=ap123
vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai

5,安装数据库

yum -y install mariadb-server mariadb
systemctl start mariadb && systemctl enable mariadb

5.1 初始化数据库(测试时此步骤建议省略)

mysql_secure_installation
回车
出现Set root password? [Y/n] 提示:输出Y,并设置密码
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

5.2 创建用户设置权限

mysql -uroot -p ap123
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'ap123';
flush privileges;
exit;

6,导入初始架构和数据,系统将提示您输入新创建的密码

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix

7,启动、访问

systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm

8,访问

http://192.168.67.134/zabbix

点击Next setp
zabbix安装部署、三分钟分钟部署zabbix监控(超详细)_第1张图片
点击Next setp(所有都是ok)
zabbix安装部署、三分钟分钟部署zabbix监控(超详细)_第2张图片
输入密码:ap123 ,点击Next setp
zabbix安装部署、三分钟分钟部署zabbix监控(超详细)_第3张图片

点击Next setp–>点击Next setp–>Finish

zabbix安装部署、三分钟分钟部署zabbix监控(超详细)_第4张图片
账号密码:Admin zabbix
zabbix安装部署、三分钟分钟部署zabbix监控(超详细)_第5张图片
设置中文
zabbix安装部署、三分钟分钟部署zabbix监控(超详细)_第6张图片
完成zabbix安装

2,一键脚本安装zabbix

链接: 一键脚本安装zabbix

你可能感兴趣的:(zabbix)