zabbix基于LNMP安装
- 安装依赖 - yum install pcre* #为了支持rewrite功能 
 yum install openssl openssl-devel
 yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y #编译需要的依赖包
- 安装nginx - wget http://nginx.org/download/nginx-1.12.2.tar.gz 
 tar xvf nginx-1.12.2.tar.gz
 cd nginx-1.12.2 执行./configure --prefix=/usr/local/nginx-1.12.2 \
 --with-http_ssl_module --with-http_v2_module \
 --with-http_stub_status_module --with-pcre
 ####--with-http_spdy_module 1.9之后没有了,--with-http_v2_module取而代之
 make && make install
- 查看防火墙是否关闭(如果虚拟机可以访问nginx,物理机不能访问nginx) - sudo systemctl status firewalld 查看防火墙状态 
 sudo systemctl stop firewalld停止防火墙
 systemctl disable firewalld.service 禁止开机启用防火墙
 vim /etc/selinux/config 进入配置文件 设置:SELINUX=disabled(重启才生效)
 #或者防火墙开放80端口
 firewall-cmd --zone=public --add-port=80/tcp --permanent
- 安装mysql 5.7 - wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm 
 yum localinstall mysql57-community-release-el7-7.noarch.rpm
 yum repolist enabled | grep "mysql.*-community.*"
 yum install mysql-community-server
 service mysqld start
 grep 'temporary password' /var/log/mysqld.log #记录随机密码 oHr6jwY>Jeay
 mysql_secure_installation #初始化
 mysql -u root -p
- 新建以及初始化数据库zabbix - create database zabbix; 
 use zabbix;
 source /root/zabbix-3.4.3/database/mysql/schema.sql;
 source /root/zabbix-3.4.3/database/mysql/data.sql;
 source /root/zabbix-3.4.3/database/mysql/images.sql;
- 安装php 5.6 稳定版本 - yum -y groupinstall "Development Tools" 
 yum install gcc make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel -y 编译需要的依赖包
 wget http://php.net/get/php-5.6.28.tar.gz/from/this/mirror -O php-5.6.28.tar.gz
 cd php-5.6.28.tar.gz
 安装ldap,如果报错无法解决去掉-with-ldap编译
 yum -y install openldap openldap-devel
 cp -frp /usr/lib64/libldap* /usr/lib/
 ./configure -prefix=/usr/local/php -with-config-file-path=/usr/local/php/etc -with-bz2 -with-curl -enable-ftp -enable-sockets -disable-ipv6 -with-gd -with-jpeg-dir=/usr/local -with-png-dir=/usr/local -with-freetype-dir=/usr/local -enable-gd-native-ttf -with-iconv-dir=/usr/local -enable-mbstring -enable-calendar -with-gettext -with-libxml-dir=/usr/local -with-zlib -with-pdo-mysql=mysqlnd -with-mysqli=mysqlnd -with-mysql=mysqlnd -with-ldap -enable-dom -enable-xml -enable-fpm -with-libdir=lib64 -enable-bcmath
 make
 make install
 #配置php
 #编辑php.ini-production
 #修改如下参数
 max_execution_time = 300
 memory_limit = 128M
 post_max_size = 16M
 upload_max_filesize = 2M
 max_input_time = 300
 date.timezone = PRC cp php.ini-production /usr/local/php/etc/php.ini
 cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
 #启动php-fpm,占用端口9000
 /usr/local/php/sbin/php-fpm
- 安装zabbix - #下载zabbix 
 wget https://nchc.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.4.3/zabbix-3.4.3.tar.gz #解压
 tar xvf zabbix-3.4.3
 cd zabbix-3.4.3 #创建zabbix用户(使用root启动时,会自动找zabbix启动)
 centos:
 groupadd --system zabbix
 useradd --system -g zabbix -d /usr/lib/zabbix -s /sbin/nologin -c "Zabbix Monitoring System" zabbix
 ubuntu:
 addgroup --system --quiet zabbix
 adduser --quiet --system --disabled-login --ingroup zabbix --home /var/lib/zabbix --no-create-home zabbix #编译
 #找到mysql_config_editor的位置
 find / -name "mysql_config*"
 #安装
 yum install mysql-devel -y
 #如果编译遇到mysql文件冲突,则可能是版本冲突,使用rpm下载
 wget ftp://ftp.pbone.net/mirror/dev.mysql.com/pub/Downloads/MySQL-5.7/mysql-community-devel-5.7.25-1.el7.x86_64.rpm- yum localinstall mysql-community-devel-5.7.25-1.el7.x86_64.rpm - yum install net-snmp-devel -y yum install libevent-devel -y #配置zabbix server和agent ./configure --enable-server --enable-agent --with-mysql=/usr/bin/mysql_config --with-net-snmp --with-libcurl --with-libxml2 make make install 
- 配置server和agentd - #启动脚本在 
 /usr/local/sbin
 #配置文件在
 /usr/local/etc
 vim /usr/local/etc/zabbix_server.conf
 DBName=zabbix
 DBUser=root
 DBPassword=123456
 DBPort=3306 vim /usr/local/etc/zabbix_agentd.conf
 Server=127.0.0.1
 ServerActive=127.0.0.1
 Hostname=Zabbix server
- 配置nginx zabbix - 要保证前端文件非root用户有权限 - cp -r /root/zabbix-3.4.3/frontends/php/* /data/zabbix-frontend 
 sudo chmod -R 777 /data/zabbix-frontend # vim /usr/local/nginx-1.12.2/conf/nginx.conf
 server {
 listen 80;
 server_name localhost; #charset koi8-r; access_log /root/logs/zabbix.access.log main; #最上面的log_format注释要取消
 index index.html index.php index.html;
 root /data/zabbix-frontend;
 location / {
 try_files $uri $uri/ /index.php?$args;
 }
 location ~ ^(.+.php)(.*)$ {
 #root /data/zabbix-frontend;
 fastcgi_split_path_info ^(.+.php)(.*)$;
 include fastcgi.conf;
 fastcgi_pass 127.0.0.1:9000;
 fastcgi_index index.php;
 #fastcgi_param PATH_INFO $fastcgi_path_info;
 #fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 #include fastcgi_params;
 }
 #error_page 404 /404.html; # redirect server error pages to the static page /50x.html
 #
 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root html;
 }
- 如果安装之后,zabbix页面报错zabbix server is not running。需要查看/tmp/zabbix_server.log日志,然后再启动/usr/local/sbin/zabbix_server
官方安装:https://www.zabbix.com/download?zabbix=3.0&os_distribution=centos&os_version=7&db=mysql
zabbix基于LNMP安装的更多相关文章
- zabbix基于docker安装
		centos的版本 # cat /etc/redhat-release CentOS Linux release (Core) docker的安装 配置yum源 # vim /etc/yum.repo ... 
- redis安装----非基于lnmp安装
		在 Ubuntu 系统安装 Redi 可以使用以下命令: $sudo apt-get update $sudo apt-get install redis-server 启动 Redis $ redi ... 
- 基于LNMP的Zabbbix之Zabbix Agent源码详细安装,但不给图
		基于LNMP的Zabbbix之Zabbix Server源码详细安装:http://www.cnblogs.com/losbyday/p/5828547.html wget http://jaist. ... 
- 基于LNMP的Zabbbix之Zabbix Server源码详细安装,但不给图
		Zabbix Server安装 看到那里有错或者有什么问题的话,求指点 邮箱:losbyday@163.com 上一篇PHP源码安装参见基于LNMP的Zabbbix之PHP源码安装:https://i ... 
- 基于LNMP架构搭建wordpress博客之安装架构说明
		架构情况 架构情况:基于LNMP架构搭建wordpress系统 软件包版本说明: 系统要求 : CentOS-6.9-x86_64-bin-DVD1.iso PHP版本 : php-7.2.29 ... 
- 基于Oracle安装Zabbix
		软件版本 Oracle Enterprise Linux 7.1 64bit Oracle Enterprise Edition 12.1.0.2 64bit Zabbix 3.2.1 准备工作 上传 ... 
- 运用Zabbix实现内网服务器状态及局域网状况监控(3) —— Zabbix服务端安装
		1. Zabbix服务端安装,基于LNMP PHP5.5+Nginx1.9安装配置:http://www.cnblogs.com/vurtne-lu/p/7707536.html MySQL5.5编译 ... 
- zabbix 基于JMX的Tomcat监控
		zabbix 基于JMX的Tomcat监控 一.环境 ubuntu14.04 LTS Java 1.7.0 zabbix 2.4.5 二.安装配置 1.安装JavaGateway 在ubuntu14. ... 
- Zabbix概念、安装以及快速入门
		Zabbix is an enterprise-class open source distributed monitoring solution.[1] Zabbix是一个企业级的.开源的.分布式的 ... 
随机推荐
- CVE-2014-1767
			[0x00].简介 CVE-2014-1767漏洞是由于Windows的afd.sys驱动在对系统内存的管理操作中,存在着悬垂指针的问题.在特定情况下攻击者可以通过该悬垂指针造成内存的double ... 
- Python——基本运算符
			计算机不止可以进行加减乘除,还可以进行多种运算,比如算数运算,逻辑运算,赋值运算等 算数运算 以下假设变量:a=10,b=20 比较运算 以下假设变量:a=10,b=20 赋值运算 以下假设变量:a= ... 
- 获取页面的title值
			<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ... 
- iOS 多线程编程
			参考文章: iOS多线程编程之NSThread的使用http://blog.csdn.net/totogo2010/article/details/8010231 iOS多线程编程之NSOperati ... 
- BZOJ-1833(数位DP)
			#include <bits/stdc++.h> using namespace std; typedef long long ll; ll a,b; int k[20]; ll dp[2 ... 
- 【Java_Spring】RestTemplate发HTTP请求详解
			Springboot — 用更优雅的方式发HTTP请求(RestTemplate详解) Spring RestTemplate提交时设置http header请求头 Spring之RestTempla ... 
- 重写laravel 异常抛出处理
			所有异常错误都由类App\Exceptions\Handler处理,该类包含两个方法:report和render. 这里我们只看render方法,该方法会将异常渲染到HTTP响应中,就是说上面的错误信 ... 
- python爬虫基础18-Chrome调试前端工具
			01 Chrome调试 抓包工具原理 Chrome 开发者工具是一套内置在Google Chrome中Web开发和调试工具.使用开发者工具来重演,调试和剖析您的网站. 其中常用的有Elements(元 ... 
- Python入门基本语法
			Python入门 以下主要讲述Python的一些基础语法,包含行的缩进在python中的重要意义,python中常见的保留字和引号的使用,如何实现单行注释和多行注释. print("he ... 
- python输出mssql 查询结果示例
			# -*- coding: utf-8 -*-# python 3.6import pymssql conn=pymssql.connect(host='*****',user='******',pa ... 
