欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

zabbix理解和安装

程序员文章站 2022-07-11 11:41:57
...


1. zabbix概念

zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装

2. zabbix实验

安装rhel7.5虚拟机
zabbix理解和安装

  1. 配置网络
  2. 配置yum源
    yum install vim lftp net-tools -y
  3. systemctl stop NetworkManager
    systemctl disable NetworkManager
  4. systemctl stop firewalld
    systemctl disable firewalld
  5. 写入解析/etc/hosts
    172.25.60.1 server1
  6. 关闭selinux
    vim /etc/sysconfig/selinux
    disabled
  7. 快照虚拟机之后不是eth0网卡:
    vim /boot/grub2/grub.cfg
    zabbix理解和安装

安装zabbix
server4:server server2和server3是agent

  1. 按顺序安装
[aaa@qq.com zabbix4.4]# yum install zabbix-server-mysql-4.4.1-1.el7.x86_64.rpm  zabbix-web-mysql-4.4.1-1.el7.noarch.rpm  zabbix-web-4.4.1-1.el7.noarch.rpm php-* fping-3.10-1.el7.x86_64.rpm
 [aaa@qq.com zabbix4.4]# yum install mariadb-server -y
[aaa@qq.com zabbix4.4]# systemctl start mariadb
[aaa@qq.com zabbix4.4]# mysql_secure_installation 
  1. 初始化zabbix数据库
[aaa@qq.com zabbix4.4]# mysql -uroot -p

MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all privileges on zabbix.* to aaa@qq.com
    -> identified by 'redhat';  # 给zabbix用户权限
Query OK, 0 rows affected (0.00 sec)
  1. 导入创建的zabbix数据库
[aaa@qq.com zabbix4.4]# zcat /usr/share/doc/zabbix-server-mysql-4.4.1/create.sql.gz | mysql -uzabbix -p zabbix
Enter password: 

[aaa@qq.com zabbix4.4]# mysql -uroot -predhat

MariaDB [(none)]> use zabbix;


Database changed
MariaDB [zabbix]> show tables;
+----------------------------+
| Tables_in_zabbix           |
+----------------------------+
| acknowledges               |
| actions                    |
| alerts                     |
| application_discovery      |
| application_prototype      |
| application_template       |
  1. 配置zabbix server
[aaa@qq.com zabbix4.4]# vim /etc/zabbix/zabbix_server.conf 

124 DBPassword=redhat

[aaa@qq.com zabbix4.4]# systemctl start zabbix-server
[aaa@qq.com zabbix4.4]# netstat -antlpe
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name    
tcp        0      0 0.0.0.0:10051           0.0.0.0:*               LISTEN      998        63338      12870/zabbix_server 
#10051是zabbix监听的端口
  1. zabbix web
[aaa@qq.com zabbix4.4]# rpm -ql zabbix-web # 查看zabbix-web生成的文件
/etc/httpd/conf.d/zabbix.conf

[aaa@qq.com zabbix4.4]# vim /etc/httpd/conf.d/zabbix.conf # 修改时区
php_value date.timezone Asia/Shanghai

[aaa@qq.com zabbix4.4]# systemctl start httpd

测试:
zabbix理解和安装
next step
next step
zabbix理解和安装
zabbix理解和安装
zabbix理解和安装
username:Admin
Password:zabbix

点击右上角的用户,可更改语言
zabbix理解和安装

相关标签: linuz企业实战