centos7 安装zabbix3.4
1 打开yum安装rpm包,自动存放下载的rpm包
下次安装时,如果没有网可以自己制作yum源
打开文件
[root@localhost etc]# vim /etc/yum.conf
keepcache=0 改为keepcache=1
rpm包存放的路径:这个路径可以自己修改成自己存放的路径
cachedir=/var/cache/yum/
2 .关闭selinux和firewall
2.1检测selinux是否关闭
[root@localhost etc]# getenforce
Enforcing #Enforcing 为打开状态
2.1.1临时关闭
[root@localhost ~]# setenforce 0 #设置SELinux 成为enforcing模式
2.1.2永久关闭
[root@localhost ~]# vi /etc/selinux/config:
将SELINUX=enforcing改为SELINUX=disabled
设置后需要重启才能生效
2.2查看默认防火墙状态
[root@localhost ~]# firewall-cmd --state
not running #关闭后显示not running,开启后显示running
1.2.1停止firewall
[root@localhost ~]# systemctl stop firewalld.service
1.2.2禁止firewall开机启动
[root@localhost ~]# systemctl disable firewalld.service
3.Zabbix3.4程序安装
3.1配置zabbix的yum源
[root@localhost ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
3.2安装zabbix程序包,安装mysql、zabbxi-agent
[root@localhost ~]# yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent
3.3启动mysql并设置开机启动,创建数据库实例,授权
[root@localhost ~]# mysql -uroot -p #登入数据库,密码123
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 zabbix@'%' identified by 'zabbix'; #授权所有主机访问数据库实例zabbix,用户名/密码:zabbix/zabbix
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; #授权localhost主机名访问数据库实例zabbix,用户名/密码:zabbix/zabbix
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost.localdomain identified by 'zabbix'; #授权localhost.localdomain主机访问数据库实例zabbix,用户名/密码:zabbix/zabbix
Query OK, 0 rows affected (0.00 sec)
导入初始模式和数据
[root@localhost ~]#cd /usr/share/doc/zabbix-server-mysql-3.4.15/ #进入create.sql.gz所在目录
[root@localhost zabbix-server-mysql-3.4.4]# zcat create.sql.gz |mysql -uroot -p123 zabbix #导入出事模式
进入mysql的zabbix库中,会有140张表,说明数据导入成功
3.4启动zabbix-server服务
3.4.1配置zabbix-server的配置文件zabbix_server.conf
[root@localhost zabbix-server-mysql-3.4.4]# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost # 数据主机名
DBName=zabbix # 数据库实例
DBUser=zabbix # 用户名
DBPassword=zabbix # 密码
3.4.2启动zabbix-server服务
[root@localhost zabbix-server-mysql-3.4.4]# systemctl start zabbix-server #启动zabbix-server服务
[root@localhost zabbix-server-mysql-3.4.4]# systemctl enable zabbix-server #设置zabbix-server服务开机自启动
3.5编辑Apache的配置文件,消注释设置正确的时区
[root@localhost zabbix-server-mysql-3.4.4]# vi /etc/httpd/conf.d/zabbix.conf
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
php_value date.timezone Asia/Shanghai
启动httpd服务 ,设置开机启动httpd服务
[root@localhost ~]# systemctl start httpd #启动httpd服务
[root@localhost ~]# systemctl enable httpd #设置开机启动httpd服务
3.启动zabbix-agent并设置开机自启动
[root@localhost ~]# systemctl start zabbix-agent # 启动zabbix-agent服务
[root@localhost ~]# systemctl enable zabbix-agent # 设置zabbix-agent服务开机自启动
4.Zabbix Web网页安装
4.1.在浏览器输入地址http://服务器ip/zabbix/setup.php,出现欢迎界面,点击下一步;
centos7 安装zabbix3.4的更多相关文章
- centos7安装zabbix3.0超详细步骤解析
centos7安装zabbix3.0超详细步骤解析 很详细,感谢作者 以下是我操作的history 622 java -version 623 javac -version 624 grep SELI ...
- 转:Centos7安装zabbix3.4超详细步骤解析
安装前准备: 1.1 安装依赖包: yum -y install wget net-snmp-devel OpenIPMI-devel httpd openssl-devel java lrzsz f ...
- centos7 安装zabbix3.0 安装zabbix4.0 yum安装zabbix 国内源安装zabbix 阿里云服务器安装zabbix
首先,此篇文章是有原因的. 刚开始也和大家一样来学习安装zabbix 奈何网上的教程和现实出现不一样的情况 在安装zabbix过程中,因为zabbix下载源是在国外,下载途中会出现终止下载的情况 tr ...
- centos7安装zabbix3.2.4
系统:CentOS Linux release 7.2.1511 (Core) zabbix:3.2.4 一.yum -y install httpd mysql mysql-server mysql ...
- Centos7 安装 zabbix3.2
简介: Zabbix的一个很优秀的分布式监控服务器, 它有两部分组成: 1. “zabbix-server”用来收集并且在web端展示数据 2. “zabbix-agent”用来采集数据,发送给ser ...
- centos7安装zabbix3.4
一.系统环境 关闭防火墙及selinux systemctl stop firewalld.service systemctl disable firewalld.service sed -i 's/ ...
- centos7安装zabbix3.5
安装centos7 自带MariaDB数据库(或者安装mysql) yum -y install mariadb-server mariadb-devel systemctlstartmariadb. ...
- centos7 安装Zabbix3.0
1 安装Mariadb数据库(代替MySQL)yum -y install mariadb*systemctl start mariadbsystemctl enable mariadb #自启动 2 ...
- Centos7安装zabbix3.4.0以及配置和使用
一.安装ZABBIX 1.环境和软件版本 注:此次是采用的rpm包方式安装,所以服务器必须要能连接互联网通过yum方式解决依赖关系 ①系统: [root@zabbix ~]# cat /etc/red ...
随机推荐
- cisco路由器上的DHCP
一.实验拓扑 二.具体配置 Router(config)#do sh run Building configuration... Current configuration : 604 bytes ...
- 导出excel——弹出框
表单提交 凡是表单提交(表单提交分3种,见以下的1.2.3)的话.而且设置了表单标签的enctype="multipart/form-data"属性.那么这个时候就会打开弹出框. ...
- 【Spring四】AOP之XML配置
AOP:Aspect Oriented Programming 面向切面编程 面向切面编程的核心是动态代理设计模式.请先參见动态代理设计模式笔记. 以Hibernate保存一个对象到数据库为例,因为 ...
- jquery动态创建form表单
function exportExcel() { var merchantName = $('#merchantName').val(); var merchantNo = $('#merchantN ...
- LeetCode 349. Intersection of Two Arrays (两个数组的相交)
Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1] ...
- 快学Scala习题解答—第十章 特质
10 特质 10.1 java.awt.Rectangle类有两个非常实用的方法translate和grow,但可惜的是像java.awt.geom.Ellipse2D这种类没有. 在Scala中,你 ...
- 删除svn
去掉文件下所有的.svn - CSDN博客 https://blog.csdn.net/arui_email/article/details/9055645 FOR /r D:\testsvn\p ...
- tiny4412 裸机程序 一、说明【转】
本文转载自:http://blog.csdn.net/eshing/article/details/37109115 首先.我想说明为什么我写这个文档?我自己想学点东西,过于求成,又过于自信,直接买了 ...
- C# winform通过按钮上移下移 解决了datasource绑定问题
事件代码: private void btn_frmDicType_MoveUp_Click(object sender, EventArgs e) { int lstLength = this.ls ...
- luogu 3796 【模板】AC自动机(加强版)
我太菜了 棒神%%% #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib ...