环境:CentOS 7.x

数据库mysql已事先安装

1、配置epel源

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

2、安装依赖
yum install OpenIPMI-devel libssh2-devel libssh2 fping libcurl-devel libxml2 libxml2-devel net-snmp* httpd-devel mysql-community-server php php-devel  -y

3、安装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-server-mysql zabbix-web-mysql zabbix-agent zabbix-sender zabbix-java-gateway zabbix-get -y

systemctl start mysqld
systemctl enable mysqld
systemctl status mysqld

mysql  -uroot  -p

登录数据库后执行如下操作:

create  database zabbix character set utf8 collate utf8_bin;
show  databases;
grant  all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
show grants for zabbix@localhost;
flush privileges;
quit;

ll /usr/share/doc/zabbix-server-mysql-3.4.14/create.sql.gz
zcat /usr/share/doc/zabbix-server-mysql-3.4.14/create.sql.gz | mysql -uzabbix -pzabbix zabbix

mkdir -p /var/lib/mysql
chown mysql:mysql -R /var/lib/mysql
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

更改配置文件/etc/httpd/conf.d/zabbix.conf 中php时区设置如下:
php_value date.timezone Asia/Shanghai

systemctl start httpd
systemctl enable httpd
systemctl status httpd

转到web界面设置(所有状态均ok),设置后的结果如下:

systemctl start zabbix-server
systemctl enable zabbix-server
systemctl status zabbix-server

systemctl start zabbix-agent
systemctl enable zabbix-agent
systemctl status zabbix-agent

登录
默认用户名:Admin
默认密码:zabbix

Agent安装
rpm -i http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install OpenIPMI-devel libssh2-devel libssh2 fping libcurl-devel libxml2 libxml2-devel net-snmp* -y

yum install zabbix-agent zabbix-sender -y

sed -i 's#Server=127.0.0.1#Server=10.0.91.7#g' /etc/zabbix/zabbix_agentd.conf
sed -i 's#ServerActive=127.0.0.1#ServerActive=10.0.91.7#g' /etc/zabbix/zabbix_agentd.conf
sed -n "s#Hostname=Zabbix server#Hostname=node.`ifconfig|grep eth0 -A 1|grep -oP '(?<=inet )[\d.]+'|awk -F. '{print $4}'`#p" /etc/zabbix/zabbix_agentd.conf #注意网卡名称

systemctl restart zabbix-agent
systemctl enable zabbix-agent
systemctl status zabbix-agent

netstat -tunlp|grep zabbix

快速安装zabbix的更多相关文章

  1. 用yum rpm 快速安装zabbix agent

    用yum 快速安装zabbix agent. wget http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.2-1.el7 ...

  2. 快速安装zabbix agent并部署监控

    1.准备yum源: epel源:yum install -y zabbix22-agent 2.上传脚本: 上传脚本事先写好的监控脚本到/script/下面 3.修改配置文件:Server=10.10 ...

  3. zabbix 3.0快速安装简介(centos 6)

    zabbix快速安装 系统版本:centos 6 1.yum源配置和zabbix.msyql安装 rpm -ivh http://mirrors.aliyun.com/zabbix/zabbix/3. ...

  4. zabbix 3.0快速安装简介(centos 7)

    zabbix快速安装 系统版本:centos 7 通过yum方法安装Zabbix3.0,安装源为阿里云 yum源配置 rpm -ivh http://mirrors.aliyun.com/zabbix ...

  5. zabbix快速安装(Ubuntu18.04, Nginx)

    ubuntu18.04快速安装zabbix4.0 https://blog.csdn.net/qq_33317586/article/details/83867756 需要安装的东西:nginx,ph ...

  6. Centos 源码安装zabbix 2.4.5

    Zabbix简介 Zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.zabbix能监视各种网络参数,保证服务器系统 的安全运营:并提供柔软的通知机制以让系统管 ...

  7. CentOS 7 yum安装Zabbix

    一.Zabbix简介 zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系统 ...

  8. CentOS7安装Zabbix

    一.Zabbix简介 Zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案. Zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系 ...

  9. CentOS 7源码安装zabbix

    一.Zabbix简介 zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系统 ...

随机推荐

  1. redis主从集群搭建

    一.安装redis 首先登陆官网下载压缩包,我安装的是最新版本5.X,下载地址http://download.redis.io/releases/redis-5.0.2.tar.gz. 进入文件所在目 ...

  2. C# 多线程(转)

    C#多线程   一.基本概念 1.进程 首先打开任务管理器,查看当前运行的进程: 从任务管理器里面可以看到当前所有正在运行的进程.那么究竟什么是进程呢? 进程(Process)是Windows系统中的 ...

  3. django网页渲染

    模板标签种类 {% for blog in blog_list %} <h2>{{ blog.title }}</h2> <p>{{ blog.timestamp ...

  4. 【Codeforces1139D_CF1139D】Steps to One (Mobius_DP)

    Problem: Codeforces 1139D Analysis: After ACing E, I gave up D and spent the left 30 minutes chattin ...

  5. 使用真正的 Redux 和 React-redux

    现在 make-react-redux 工程代码中的 Redux 和 React-redux 都是我们自己写的,现在让我们来使用真正的官方版本的 Redux 和 React-redux. 在工程目录下 ...

  6. 人物丨让小三吐血,让原配泣血——24K渣男郎咸平

    http://url.cn/5swgmythttps://www.toutiao.com/i6650650793743483395人物丨让小三吐血,让原配泣血——24K渣男郎咸平 人物丨让小三吐血,让 ...

  7. iOS Getter 和Setter 注册xibcell

    // 初始化cell的xib的方式 [tableView registerNib:[UINib nibWithNibName:@"LXmiddleCell" bundle:nil] ...

  8. 从Java synchronized和volatile说起

    请参看https://www.cnblogs.com/chengxiao/p/6528109.html这个链接,说的特别好

  9. jq获取设置选中值

    var standard = $('input[name="standard"]:checked').val(); $("input[name='advertByid'] ...

  10. Apache的HttpClient的使用

    Apache的HttpClient可以被用于从客户端发送HTTP请求到服务器端,其中封装了客户端发送http的get和post请求 使用Apache的HttpClient发送GET和POST请求的步骤 ...