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

 

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