Centos6.5离线配置zabbix

||=======linux环境离线安装zabbix详细说明书(附带多有包)=====||
||                 by-qq:1422616120                                                        ||      
||                 ==--天涯浪子--==                                                           ||
||=================================================||

如下所述所有文件均在qq群:群号:642494015


入门命令:tar的安装:1、./configure (需要指定路径后边添加--prefix=/usr/local/某某包,需要明确子包具体路径前边加LD_LIBRARY_PATH=/usr/local/某某包/lib:/usr/local/lib );2、make && make install

本说明书是根据centos6.5进行的配置安装,如果是其他版本请下载包之前核对版本

一、安装主要步骤
1、安装php环境(带上nginx或者httpd)
2、安装mysql(导入zabbix的三个sql文件)
3、安装zabbix,然后把zabbix编译后产生的文件夹放到nginx或者httpd的文件目录里面。

二、安装详细步骤(查找文件 find / -name aaaaa.tar.gz 参考网址:
https://blog.csdn.net/zhang_shufeng/article/details/43160207)

依次安装=====>
1、安装gcc_rpm文件夹所有rpm文件,安装libcurl文件夹所有rpm文件(https://blog.51cto.com/asaderas/1686232),【当前文件夹忽略依赖安装全部rpm -Uvh *.rpm --nodeps --force】
   zlib、libpng、jpegsrc、freetype、apr*2(util编译需要按地上apr本体路径./configure --with-apr=/usr/local/apr)、gd2.1.3或者libgd-2.1.0.tar.gz (./configure --prefix=/usr/local/gd)  
   、libiconv-1.15.tar.gz、libxml2、mcrypt文件夹内三个包(其中libmcrypt ./configure --prefix=/usr/local/libmcrypt。!!!注意:最后安装mcrypt.tar其中mcrypt LD_LIBRARY_PATH=/usr/local/libmcrypt/lib:/usr/local/lib ./configure --with-libmcrypt-prefix=/usr/local/libmcrypt)、libcurl-7.20
libcurl-devel-7.20(参考https://www.cnblogs.com/zuxing/articles/8317809.html )


========常用解压命令=====tar -xzvf file.tar.gz


2、安装php-5.6.31.tar.gz,参考网址: https://blog.51cto.com/superpcm/2092800
https://www.cnblogs.com/jackspider/p/7452348.html

低版本php----后边调整成一行-----./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-freetype-dir=/usr/local/freetype --with-gd=/usr/local/gd --with-zlib --with-libxml-dir=/usr/local/libxml2 --with-jpeg-dir=/usr/local/jpeg --with-png-dir --enable-mbstring=all --enable-mbregex --enable-shared 

php5.6.31----后边调整成一行-----./configure --prefix=/usr/local/php5.6 --disable-debug --enable-shared --enable-fpm --with-fpm-user=www --with-fpm-group=www  --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-libxml-dir --with-openssl --with-bz2 --with-mcrypt  --enable-gd-native-ttf --with-curl --with-zlib-dir -with-gettext --with-jpeg-dir --with-png-dir --with-bz2 --with-freetype-dir --with-iconv=/usr/local/libiconv --with-config-file-path=/usr/local/php5.6/etc --enable-mbstring --with-gd --disable-debug  --enable-short-tags --disable-posix --enable-exif --enable-ftp --enable-sockets --with-mhash --with-libcurl --enable-zip


3、检验和使用相关命令
配置php参数:
/usr/local/php5.6.31/lib/php.ini
/usr/local/php/lib/php.ini

重启php
ps -ef | grep rpm-fpm| grep -v grep | cut -c 9-15 | xargs kill -s 9
netstat -tlnp |grep 9000
lsof -i:9000
kill -9 pid(注意需要先kill root用户的进程)
启动php
/usr/local/php5.6.31/sbin/php-fpm -t
/usr/local/php5.6.31/sbin/php-fpm

重启php:参考网址:https://blog.csdn.net/wzx19840423/article/details/79071928
ps aux|grep php-fpm
kill -USR2 36758

查找文件 find / -name aaaaa.cc
添加对外网络端口
iptables -A INPUT -ptcp --dport  8090 -j ACCEPT
/etc/rc.d/init.d/iptables save

解压缩
tar -xvf file.tar //解压 tar包
tar -xzvf file.tar.gz //解压tar.gz
tar -xjvf file.tar.bz2   //解压 tar.bz2
tar -xZvf file.tar.Z   //解压tar.Z
unrar e file.rar //解压rar
unzip file.zip //解压zip

========================================================================================================================

ngin

chmod -R 777 /usr/local/nginx/html/

4、安装mysql前准备工作:参考网址:https://blog.csdn.net/xiaTianCsDN/article/details/83476793
   安装rpm文件夹所有rpm文件夹内,安装mcrypt文件夹所有rpm文件(https://blog.51cto.com/asaderas/1686232),【当前文件夹忽略依赖安装全部rpm -Uvh *.rpm --nodeps --force】

5、安装mysql
常用命令
----tar -xzvf file.tar.gz //解压tar.gz
----导入zabbix3个sql文件
----创建zabbix库,用户密码。


========================================================================================================================
6、安装zabbix准备工作,安装javac,
7、  ./configure --enable-server --enable-agent --with-mysql --enable-java --enable-ipv6  --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc --with-ssh2 --with-openipmi --with-openssl --prefix=/usr/local/zabbix

8、安装成功复制文件到php文件目录用于前端展示了。
cp -a  /home/software/zabbix-3.0.4/frontends/php/* /var/www/html/zabbix
centos apach路径/var/www/html/zabbix
php5.3.28径/usr/local/apache2/bin
php5.6.0 安装http://www.oicto.com/centos6-564-install-php5-6-5/

========================================================================================================================
9、zabbix使用简介
------------cpu预警配置
https://blog.csdn.net/weixin_37998647/article/details/78931163
tomact监控
https://blog.csdn.net/yongyong169/article/details/81741178

------------JMX Remote jar下载
https://blog.csdn.net/hwhua1986/article/details/54376363
tomact监控配置
https://blog.csdn.net/l835311324/article/details/82988184


常用命令-解压
tar -xvf file.tar //解压 tar包
tar -xzvf file.tar.gz //解压tar.gz
tar -xjvf file.tar.bz2   //解压 tar.bz2
tar -xZvf file.tar.Z   //解压tar.Z
unrar e file.rar //解压rar
unzip file.zip //解压zip
查找文件 find / -name aaaaa.cc
添加对外网络端口
iptables -A INPUT -ptcp --dport  8090 -j ACCEPT
/etc/rc.d/init.d/iptables save

https://blog.csdn.net/achenyuan/article/details/86710829


==========================================================================

配置发送邮件
https://blog.51cto.com/712463/2089040(仅仅下载安装文件)

https://www.cnblogs.com/ultranms/p/9111133.html(配置怎么发送邮件)注意这个网站里面写的都要执行,尤其是配置zabbix里面动作参数的,有中文没关系,需要复制粘贴的全都粘贴上

==========================================================================

Hostname
server端测试链接客户agent==================》》》
/usr/bin/zabbix_get -s 203.207.118.60 -p 10050 -k "system.uptime" 

server端测试链接客户agent链接tocmat==================》》》
java -jar cmdline-jmxclient-0.10.3.jar - 203.207.118.60:12345 java.lang:type=Memory NonHeapMemoryUsage
 


linux

==============================END========================================

妈了个安东尼奥卡列宁蛋蛋上述执行过程中必然还存在问题,我建了一个答疑qq群,随问随答。搞定这个东西真是百般挫折
群号:642494015

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章