标签:creat 自动 选择 firewall mysq 初始 模板 启动mysql cell
zabbix安装部署
目录
一、环境准备... 3
1.1、版本:... 3
1.2、部署环境... 3
二、安装部署... 3
2.1、zabbix安装... 3
2.1.1、下载zabbix的rpm仓库包... 3
2.1.2、更新yum.. 3
2.1.3、安装zabbix-server和zabbix-web-mysql 3
2.2、安装并且启动mysql5.6及初始化数据库信息... 4
2.2.1、下载mysql的rpm包... 4
2.2.2、安装mysql 4
2.2.3、启动mysql并设置为开机自启动... 4
2.2.4、初始化数据库... 4
2.2.5、创建zabbix数据库,创建zabbix账号... 4
2.2.6、导入默认的zabbix数据库信息... 4
2.3、配置zabbix. 5
2.3.1、修改zabbix_server.conf的配置文件... 5
2.3.2、修改配置文件/etc/httpd/conf.d/zabbix.conf,时区改成 Asia/Shanghai 5
2.3.3、启动apache/zabbix-server服务并设置为开机启动... 5
2.4,、访问zabbix. 6
2.4.1http://本机IP/zabbix,如下图所示:... 6
2.4.2、使用Admin 密码:yourpassword 登陆... 6
2.5、创建自动注册规则... 6
2.5.2、配置--动作--选择“自动发现”--创建动作... 8
OS:CentOS7.6
Zabbix:4.0.1
Mysql:5.6
1.2、部署环境:
关闭firewalld
关闭selinux
Hostname |
Ip |
主机用途 |
Zabbix-server |
192.168.1.10 |
服务端 |
Zabbix-agent |
|
代理端 |
[root@centos223 ~]# rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
[root@centos223 ~]# yum clean all
[root@centos223 ~]# yum repolist
[root@centos223 ~]# yum install -y zabbix-server-mysql zabbix-web-mysql
[root@centos223~]#rpm -ivh http://repo.mysql.com/yum/mysql-5.6-community/el/6/x86_64/mysql-community-release-el6-5.noarch.rpm
[root@centos223 ~]# yum install -y mysql-community-server
[root@centos223 ~]# systemctl start mysqld
[root@centos223 ~]# /sbin/chkconfig mysqld on
[root@centos223 ~]# mysql_secure_installation
[root@centos223 ~]# mysql -uroot -p
…
mysql> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on zabbix.* to ‘zabbix‘@‘localhost‘ identified by ‘zabbix‘;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
[root@centos223 ~]# zcat /usr/share/doc/zabbix-server-mysql-4.0.11/create.sql.gz | mysql zabbix -uzabbix -pzabbix
[root@centos223 ~]# grep ^DB /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
[root@centos223 ~]# grep date.timezone /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
[root@centos223 ~]# systemctl restart httpd zabbix-server
[root@centos223 ~]# systemctl enable httpd zabbix-server
2.5.1、配置--自动发现--创建发现规则
在动作选项下:
A:主机地址为192.168.1.100-254
C:服务类型为zabbix客户端
D:自动发现状态为上(UP)
在操作选项下:
添加动作操作细节:
添加主机
添加到主机群组: Discovered hosts, Linux servers
链接到模板: Template OS Linux
标签:creat 自动 选择 firewall mysq 初始 模板 启动mysql cell
原文地址:https://www.cnblogs.com/flytor/p/11437989.html