安裝Zabbix過程中出現的問題集


 

1、web頁面無法顯示:

原因一:檢查系統是否安裝apache,以便解析html

原因二php沒有完全安裝好

原因三apache沒有提供對php的支持

原因四apache的配置文件中DocumentRoot的參數值沒有改成zabbix的路徑,zabbix默認的路徑    是/var/www/html/

 

解決方案一:安裝apache

tar zxvf httpd-2.2.23.tar.gz

cd httpd-2.2.23

./configure --prefix=/usr/local/apache

make && make install

安裝過程中出現錯誤, 則在編譯時入加 --with-included-apr 參數

 

解決方案二:完整安裝php

安裝php時首先要檢查系統是否安裝了支持zabbix的依賴包,特別GD庫的安裝,如果gd庫沒安裝會 導致zabbix安裝過程出現問題。

 

<1>安裝freetypelibpngjpeg以便於讓php支持GD庫(WeatherMap插件必須要較新的GD庫支持)

tar -zxvf libpng-1.2.18.tar.gz

./configure --prefix=/usr/local/libpng

make && make install

 

tar -zxvf freetype-2.3.5.tar.gz

./configure --prefix=/usr/local/freetype

make &&make install

 

tar -zxvf jpegsrc.v7.tar.gz

mkdir /usr/local/libjpeg

mkdir /usr/local/libjpeg/bin

mkdir /usr/local/libjpeg/lib

mkdir /usr/local/libjpeg/man

mkdir /usr/local/libjpeg/man/man1

./configure --prefix=/usr/local/libjpeg/ --enable-shared --enable-static

make && make install

 

tar -zxvf gd-2.0.28.tar.gz

./configure --prefix=/usr/local/libgd --with-png --with-freetype=/usr/local/freetype/ --with- jpeg=/usr/local/libjpeg/ 

make && make install

 

安裝完成後,gd進行配置:

 

vi /etc/ld.so.conf

/usr/local/freetype/lib

/usr/local/libjpeg/lib

/usr/local/libgd/lib

ldconfig   --------執行命令,使用動態裝入器裝載找到的共享庫

 

<2>安裝PHP

 

cd php-5.6.0

  ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with- mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-bcmath --enable- mbstring --enable-sockets --with-gd --with- gettext --with-freetype-dir=/usr/local/freetype/ --with-jpeg- dir=/usr/local/libjpeg/ 

make clean 

make && make install

安裝完後將tar包中的php.ini-developmentphp.ini-production複製到到/usr/local/php/lib下,並更名爲php.ini

 

 

-with-apxs2=/usr/local/apache/bin/apxs 

支持apache

--with-mysql=/usr/local/mysql/ 

支持mysql

--with-mysqli=/usr/local/mysql/bin/mysql_config

優化支持mysqli

--enable-bcmath 

打開圖片大小調整

--enable-mbstring 

多字節,字符串的支持

--enable-sockets 

打開sockets 支持

--with-gd 

打開gd庫的支持

--with-gettext 

打開gnugettext 支持,編碼庫用到

--with-freetype-dir=/usr/local/freetype/

打開對freetype字體庫的支持

--with-jpeg-dir=/usr/local/libjpeg/ 

打開對jpeg圖片的支持

 

解決方案三:apache沒有提供對php的支持

打開apache的配置文檔/usr/local/apache/conf/httpd.conf,修改其中參數

模塊中修改爲

  DirectoryIndex index.html index.php

 

模塊中添加

AddType application/x-httpd-php .php .php3 .php4

修改完成後需重新啓動apache

 

2、訪問目錄http://ip/zabbix會顯示:

Forbidden  

You don't have permission to access /test/ on this server.

 

解決方案:

apache的配置文檔中找到,其中定義了Deny from all,可以將其註釋,就不會封網段

 

3、zabbix在安裝過程中出現無法找到sock文件的問題

解決方案:

mysqlsocket.sock文件軟鏈接到zabbix的路徑

 

4、登錄進zabbix頁面中,頁面顯示如下錯誤:

ini_set(): Use of mbstring.internal_encoding is deprecated [dashboard.php:21 → require_once() → 

ZBase->run() → ZBase>initLocales() → init_mbstrings() →

 ini_set() in /var/www/html/zabbix/include/locales.inc.php:25]

 

解決方案:

將路徑中/var/www/html/zabbix/include/locales.inc.php的第25行數據註釋掉,頁面不會顯示錯誤

 

 


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