zabbix服务器yum安装
2017-10-20 15:58
190 查看
首先要安装LAMP环境;安装zabbix3.4.2版本
服务器:192.168.160.2
客户端:192.168.160.3
1、安装zabbix源
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
2、安装Zabbix server and agent:(配置自己监控自己,所以安装了zabbix-agent):
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
3、编辑 file /etc/httpd/conf.d/zabbix:
vi /etc/httpd/conf.d/zabbix.conf
更新时区:
php_value date.timezone Asia/Shanghai
重启httpd
systemctl restart httpd
4、创建MySQL 数据库和用户
登录MariaDB:
mysql –u root –p
创建一个数据库‘zabbixdb’和数据库用户‘zabbix’
MariaDB [(none)]> create database zabbixcharacter set utf8;
MariaDB [(none)]> grant all privilegeson zabbix.* to 'zabbix'%' identified by 'zabbix';
MariaDB [(none)]> flush privileges;
5、数据库导入zabbixtemplate
使用数据库用户zabbix登录数据库
mysql –uzabbix –p
切换到zabbix数据库
use zabbix
导入模板数据
切换到zabbix-server目录
[root@localhost ~]# cd/usr/share/doc/zabbix-server-mysql-3.2.4/
解压create.sql.gz这个文件:
[root@localhost zabbix-server-mysql-3.2.4]#gunzip create.sql.gz
[root@localhost zabbix-server-mysql-3.2.4]#mysql -uzabbix -p zabbix < create.sql
6、配置Zabbix server
DBHost=localhost 数据库ip地址
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
配置zabbix server 的ip
Server=127.0.0.1 #<==其他agent机器输入服务器ip
ServerActive=127.0.0.1 #<==其他agent机器输入服务器ip
Hostname=localhost
systemctl start zabbix-server zabbix-agent
systemctl restart httpd mariadb
systemctl enable zabbix-server zabbix-agent
浏览器访问http://ip/zabbix
安装完成后,重定向到zabbix控制台登录页面.
输入用户名和密码,默认的用户名和密码为admin/Zabbix
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-agent -y
vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.160.2
#用于被动模式,数据获取,主动模式和被动模式按照自己需求选择。
ServerActive=192.168.1.60.2
#用于主动模式,数据提交,主动模式和被动模式按照自己需求选择。
Hostname=node1
systemctl start zabbix-agent
#启动zabbix agent
服务器:192.168.160.2
客户端:192.168.160.3
1、安装zabbix源
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
2、安装Zabbix server and agent:(配置自己监控自己,所以安装了zabbix-agent):
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
3、编辑 file /etc/httpd/conf.d/zabbix:
vi /etc/httpd/conf.d/zabbix.conf
更新时区:
php_value date.timezone Asia/Shanghai
重启httpd
systemctl restart httpd
4、创建MySQL 数据库和用户
登录MariaDB:
mysql –u root –p
创建一个数据库‘zabbixdb’和数据库用户‘zabbix’
MariaDB [(none)]> create database zabbixcharacter set utf8;
MariaDB [(none)]> grant all privilegeson zabbix.* to 'zabbix'%' identified by 'zabbix';
MariaDB [(none)]> flush privileges;
5、数据库导入zabbixtemplate
使用数据库用户zabbix登录数据库
mysql –uzabbix –p
切换到zabbix数据库
use zabbix
导入模板数据
切换到zabbix-server目录
[root@localhost ~]# cd/usr/share/doc/zabbix-server-mysql-3.2.4/
解压create.sql.gz这个文件:
[root@localhost zabbix-server-mysql-3.2.4]#gunzip create.sql.gz
[root@localhost zabbix-server-mysql-3.2.4]#mysql -uzabbix -p zabbix < create.sql
6、配置Zabbix server
配置Zabbixserver
vim /etc/zabbix/zabbix_server.confDBHost=localhost 数据库ip地址
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
配置本机zabbix-agent
vi /etc/zabbix/zabbix_agentd.conf配置zabbix server 的ip
Server=127.0.0.1 #<==其他agent机器输入服务器ip
ServerActive=127.0.0.1 #<==其他agent机器输入服务器ip
Hostname=localhost
systemctl start zabbix-server zabbix-agent
systemctl restart httpd mariadb
systemctl enable zabbix-server zabbix-agent
浏览器访问http://ip/zabbix
安装完成后,重定向到zabbix控制台登录页面.
输入用户名和密码,默认的用户名和密码为admin/Zabbix
其他zabbix_agent安装配置
客户端安装rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-agent -y
vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.160.2
#用于被动模式,数据获取,主动模式和被动模式按照自己需求选择。
ServerActive=192.168.1.60.2
#用于主动模式,数据提交,主动模式和被动模式按照自己需求选择。
Hostname=node1
systemctl start zabbix-agent
#启动zabbix agent
相关文章推荐
- Centos 7.0 下安装 Zabbix server 3.0服务器的安装及 监控主机的加入(1)
- yum安装nginx-mysql-php-fastcgi构建LNMP服务器
- CentOS 5.4 服务器配置 yum安装Apache+php+Mysql+phpmyadmin
- centos服务器配置--yum安装mysql
- CentOS 7以yum方式安装zabbix3.2及配置文件详解
- CentOS 5.5服务器使用yum安装配置Apache、PHP和Mysql
- CentOS 6.4中yum安装配置LAMP服务器(Apache+MySQL+PHP5)
- 只具备内网的服务器通过yum安装软件
- CentOS 6 yum 安装samba文件服务器
- 使用yum在CentOS下安装Nginx服务器
- nginx服务器详细安装过程(使用yum 和 源码包两种安装方式,并说明其区别)
- centos7下安装apache服务器httpd的yum方式安装
- CentOS 5.4 服务器配置 yum安装Apache+php+Mysql
- zabbix server 2.2.3 yum安装文档
- zabbix 安装-yum
- 【服务器实战搭建】centos7下使用yum安装mysql
- 超级web服务器yum 安装apache+源码编译tomcat+awstat+phpmyadmin+mysql+php+AB压力测试
- CentOS 6.4 yum安装配置LAMP服务器(Apache+PHP5+MySQL)
- nginx服务器详细安装过程(使用yum 和 源码包两种安装方式,并说明其区别)
- centos 5 yum安装与配置vsFTPd FTP服务器详细步骤