安装Zabbix过程中出现的问题集
安裝Zabbix過(guò)程中出現(xiàn)的問(wèn)題集
?
1、web頁(yè)面無(wú)法顯示:
原因一:檢查系統(tǒng)是否安裝apache,以便解析html
原因二:php沒(méi)有完全安裝好
原因三:apache沒(méi)有提供對(duì)php的支持
原因四:apache的配置文件中DocumentRoot的參數(shù)值沒(méi)有改成zabbix的路徑,zabbix默認(rèn)的路徑??是/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
若安裝過(guò)程中出現(xiàn)錯(cuò)誤,?則在編譯時(shí)入加?--with-included-apr?參數(shù)。
?
解決方案二:完整安裝php
安裝php時(shí)首先要檢查系統(tǒng)是否安裝了支持zabbix的依賴包,特別GD庫(kù)的安裝,如果gd庫(kù)沒(méi)安裝會(huì)導(dǎo)致zabbix安裝過(guò)程出現(xiàn)問(wèn)題。
?
<1>安裝freetype,libpng,jpeg以便于讓php支持GD庫(kù)(WeatherMap插件必須要較新的GD庫(kù)支持)
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
?
安裝完成后,對(duì)gd庫(kù)進(jìn)行配置:
?
vi?/etc/ld.so.conf
/usr/local/freetype/lib
/usr/local/libjpeg/lib
/usr/local/libgd/lib
ldconfig?? --------執(zhí)行命令,使用動(dòng)態(tài)裝入器裝載找到的共享庫(kù)
?
<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-development或php.ini-production復(fù)制到到/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 | 優(yōu)化支持mysqli |
--enable-bcmath? | 打開圖片大小調(diào)整 |
--enable-mbstring? | 多字節(jié),字符串的支持 |
--enable-sockets? | 打開sockets?支持 |
--with-gd? | 打開gd庫(kù)的支持 |
--with-gettext? | 打開gnu的gettext?支持,編碼庫(kù)用到 |
--with-freetype-dir=/usr/local/freetype/ | 打開對(duì)freetype字體庫(kù)的支持 |
--with-jpeg-dir=/usr/local/libjpeg/? | 打開對(duì)jpeg圖片的支持 |
?
解決方案三:apache沒(méi)有提供對(duì)php的支持
打開apache的配置文檔/usr/local/apache/conf/httpd.conf,修改其中參數(shù)
模塊中修改為
? DirectoryIndex?index.html?index.php
?
模塊中添加
AddType?application/x-httpd-php?.php?.php3?.php4
修改完成后需重新啟動(dòng)apache
?
2、訪問(wèn)目錄http://ip/zabbix會(huì)顯示:
Forbidden??
You?don't?have?permission?to?access?/test/?on?this?server.
?
解決方案:
在apache的配置文檔中找到,其中定義了Deny?from?all,可以將其注釋,就不會(huì)封網(wǎng)段
?
3、zabbix在安裝過(guò)程中出現(xiàn)無(wú)法找到sock文件的問(wèn)題
解決方案:
將mysql的socket.sock文件軟鏈接到zabbix的路徑
ln -s /var/lib/mysql/mysql.sock /tmp/
?
4、登錄進(jìn)zabbix頁(yè)面中,頁(yè)面顯示如下錯(cuò)誤:
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行數(shù)據(jù)注釋掉,頁(yè)面不會(huì)顯示錯(cuò)誤
轉(zhuǎn)載于:https://blog.51cto.com/lvnian/1826713
總結(jié)
以上是生活随笔為你收集整理的安装Zabbix过程中出现的问题集的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: java-数据结构-续
- 下一篇: storm基础系列之五---------