YUM安装Zabbix

环境:Centos 6.6

已完成LNMP安装

[[email protected] ~]# cd /etc/
[[email protected] etc]# grep max_execution_time php.ini
max_execution_time = 300
[[email protected] etc]# grep post_max_size php.ini
post_max_size = 16M
[[email protected] etc]# grep ^max_input_time php.ini
max_input_time = 300
[[email protected] etc]# grep ‘^date.timezone‘ php.ini
date.timezone = "Asia/Shanghai"
[[email protected] ~]#
[[email protected] etc]# grep php-fpm.pid php-fpm.conf
pid = /var/run/php-fpm/php-fpm.pid
[[email protected] etc]#
[[email protected] etc]# cd php-fpm.d/
[[email protected] php-fpm.d]# grep ^pm.min_spare_servers www.conf
pm.min_spare_servers = 5
[[email protected] php-fpm.d]# grep ^pm.max_spare_servers www.conf
pm.max_spare_servers = 35
[[email protected] php-fpm.d]# grep ^pm.start_servers www.conf
pm.start_servers = 5
[[email protected] php-fpm.d]# grep ^listen www.conf
listen = 127.0.0.1:9000
listen.allowed_clients = 127.0.0.1
[[email protected] php-fpm.d]# netstat -anp|grep php-fpm
tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN      1179/php-fpm        
unix  3      [ ]         STREAM     CONNECTED     9145   1179/php-fpm        
unix  3      [ ]         STREAM     CONNECTED     9144   1179/php-fpm        
[[email protected] php-fpm.d]# ps -ef |grep php |grep -v grep
root      1179     1  0 21:59 ?        00:00:00 php-fpm: master process (/etc/php-fpm.conf)
nginx     1180  1179  0 21:59 ?        00:00:00 php-fpm: pool www            
nginx     1181  1179  0 21:59 ?        00:00:00 php-fpm: pool www            
nginx     1182  1179  0 21:59 ?        00:00:00 php-fpm: pool www            
nginx     1183  1179  0 21:59 ?        00:00:00 php-fpm: pool www            
nginx     1184  1179  0 21:59 ?        00:00:00 php-fpm: pool www            
[[email protected] php-fpm.d]#
[[email protected] zabbix]# ls
zabbix-2.0.14-1.el6.x86_64.rpm         zabbix-server-2.0.14-1.el6.x86_64.rpm
zabbix-agent-2.0.14-1.el6.x86_64.rpm   zabbix-server-mysql-2.0.14-1.el6.x86_64.rpm
zabbix-get-2.0.14-1.el6.x86_64.rpm     zabbix-web-2.0.14-1.el6.noarch.rpm
zabbix-sender-2.0.14-1.el6.x86_64.rpm  zabbix-web-mysql-2.0.14-1.el6.noarch.rpm
[[email protected] zabbix]# yum -y localinstall zabbix*.rpm
[[email protected] zabbix]# mysql -uroot -predhat
mysql> create database zabbix default charset utf8;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on zabbix.* to [email protected] identified by ‘zabbix‘;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all privileges on zabbix.* to [email protected] identified by ‘zabbix‘;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>
[[email protected] zabbix]# rpm -ql zabbix-web
[[email protected] zabbix]# cp -rfp /usr/share/zabbix /var/www/html/zabbix
[[email protected] ~]# rpm -ql zabbix-server-mysql
[[email protected] ~]# cd /usr/share/doc/zabbix-server-mysql-2.0.14/create/
[[email protected] create]# mysql -uroot -predhat zabbix < schema.sql
[[email protected] create]# mysql -uroot -predhat zabbix < images.sql
[[email protected] create]# mysql -uroot -predhat zabbix < data.sql
[[email protected] ~]# cd /etc/zabbix/
[[email protected] zabbix]# grep ^DB zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBSocket=/var/lib/mysql/mysql.sock
DBPort=3306
[[email protected] zabbix]# grep ^LogFile zabbix_server.conf
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
[[email protected] zabbix]#
[[email protected] zabbix]# grep ^Server zabbix_agentd.conf
Server=192.168.31.160
ServerActive=192.168.31.160
[[email protected] zabbix]# grep ^Hostname zabbix_agentd.conf
Hostname=192.168.31.160
[[email protected] zabbix]# grep ^Unsafe zabbix_agentd.conf
UnsafeUserParameters=1
[[email protected] zabbix]#
[[email protected] zabbix]# /etc/init.d/zabbix-server start
Starting Zabbix server:                                    [  OK  ]
[[email protected] zabbix]# /etc/init.d/zabbix-agent start
Starting Zabbix agent:                                     [  OK  ]
[[email protected] zabbix]# chkconfig zabbix-server on
[[email protected] zabbix]# chkconfig zabbix-agent on
[[email protected] ~]# cd /etc/nginx/conf.d/
[[email protected] conf.d]# head -25 default.conf|tail -6
    location /zabbix {
 root /var/www/html;
 index index.php;
 access_log/var/log/zabbix/zabbix.access.log main;
 try_files $uri $uri/ /index.php?$args;
    }
[[email protected] conf.d]#
[[email protected] conf.d]# /etc/init.d/nginx restart
Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]
[[email protected] conf.d]#
[[email protected] ~]# chown zabbix:nginx /etc/zabbix/ -R
[[email protected] ~]# chmod 775 /etc/zabbix/web/

时间: 2024-08-29 18:11:39

YUM安装Zabbix的相关文章

CentOS 7 yum安装Zabbix

CentOS 7 yum安装Zabbix 一.Zabbix简介 zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题. 下面是Centos7上yum安装zabbix的步骤. 二.Zabbix安装 本文档在同一台机器上安装了zabbix-server 和zabbix-agent 自己监控自己. 1.配置LAMP 参照下面的链接 Centos

全程使用yum安装zabbix记录

环境准备:web环境(apache,php,mysql) 三个都使用yum来安装 准备yum源,使用阿里的源(新浪源安装apache的时候有问题) [[email protected]_master yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo 安装php,apache,mysql [[email protected]_master yum.

搭建zabbix(yum安装zabbix,ngixn,mysql,源码安装php)

yum安装zabbix,ngixn,mysql,源码安装php,并不是有特别的效果,而是zabbix源码安装失败了... 1.安装zabbix的repo2.yum 安装 3.yum安装mariadb mariadb-server4.创库zabbix,赋权给zabbix用户5.将zabbix文件的库导入mysql中 6.修改zabbix_server.conf配置文件7.启动开机自启zabbix_server.service 8.yum安装nginx9.修改nginx.conf配置文件,用ngin

centos7.x之yum安装zabbix

1.安装LAMP #关闭防火墙方便测试 yum install epel-release -y systemctl stop firewalld.service systemctl disable firewalld.service setenforce 0 #安装httpd yum install httpd systemctl start httpd.service  systemctl enable httpd.service #安装数据库5.6 wget http://dev.mysql

centos6.5 yum 安装zabbix

关掉相关安全设置,要不出现一大堆乱七八糟的问题 service iptables stop chkconfig iptables off setenforce 0 sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config 卸载相关软件包(如果有的话),保持干净环境 yum remove -y mysql* httpd* php* nginx* zabbix* 安装软件包和依赖包 yum -y install wget

yum安装zabbix监控

公司的服务器由于没有监控软件监控,最感觉不安全,就开始研究zabbix的安装,最后找到一个最简单的安装方法,在这里记录一下,方便以后的查阅 1.安装zabbix官方的软件配置仓库 rpm -ivh http://repo.zabbix.com/zabbix/2.0/rhel/6/x86_64/zabbix-release-2.0-1.el6.noarch.rpm 安装完成之后我们来看一下可用的zabbix安装包信息: yum search zabbix 2.安装zabbix服务器端, mysql

centos7 yum 安装zabbix设置钉钉机器人报警

原文地址 网上有很多zabbix使用钉钉触发告警信息的攻略, 需要注意的是zabbix3.2不能使用那些攻略进行触发报警. 至于监控内容啥的不在这篇文章里谈及, 我们这里只谈报警部分. 作者这里的环境基本都是centos 7.4 以及zabbix3.2 yum 安装,如果读者用的其他系统, 或安装方式不同, 此文章仅供参考. 搭建好zabbix3.2环境,然后: 从网上下载一下钉钉的zabbix机器人: 钉钉-zabbix-robot 解压缩并放在你的任意位置,改名为dingding.sh并放到

使用yum安装zabbix报错

背景:我使用yum方式安装软件时,比如zabbix这种软件,我们在安装时一般都是直接到zabbix官网,按照官方的步骤进行安装,但是有一个问题,官方的服务器不在国内,时常会在安装时导致超时报错.此时解决思路就因该是将官方源替换成国内的镜像源,例如阿里云.163的镜像源.要点就是网络问题!网络问题!网络问题! 注意安装zabbix时也要选择阿里云的镜像repo,地址如下: rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/4.4/rhel/7/x8

Yum 安装 zabbix...

环境:centos6_64 Mysql环境.禁用iptable selinux 安装基础包: 需要安装LAMP.自己安装吧...不会的请移步...LAMP rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm yum install zabbix-server-mysql zabbix-web-mysql -y yum install zabbix-agent -y