zabbix setup.php出错,apache配置zabbix下setup.php无法显示
apache
1、web頁面無法顯示:
原因一:檢查系統(tǒng)是否安裝apache,以便解析html
原因二:php沒有完全安裝好
原因三:apache沒有提供對php的支持
原因四:apache的配置文件中DocumentRoot的參數(shù)值沒有改成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
若安裝過程中出現(xiàn)錯(cuò)誤,則在編譯時(shí)入加--with-included-apr參數(shù)。
解決方案二:完整安裝php
安裝php時(shí)首先要檢查系統(tǒng)是否安裝了支持zabbix的依賴包,特別GD庫的安裝,如果gd庫沒安裝會(huì) 導(dǎo)致zabbix安裝過程出現(xiàn)問題。
<1>安裝freetype,libpng,jpeg以便于讓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庫進(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)裝入器裝載找到的共享庫
<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庫的支持
--with-gettext打開gnu的gettext支持,編碼庫用到
--with-freetype-dir=/usr/local/freetype/打開對freetype字體庫的支持
--with-jpeg-dir=/usr/local/libjpeg/打開對jpeg圖片的支持
解決方案三:apache沒有提供對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、訪問目錄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在安裝過程中出現(xiàn)無法找到sock文件的問題
解決方案:
將mysql的socket.sock文件軟鏈接到zabbix的路徑
4、登錄進(jìn)zabbix頁面中,頁面顯示如下錯(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ù)注釋掉,頁面不會(huì)顯示錯(cuò)誤
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
以上是生活随笔為你收集整理的zabbix setup.php出错,apache配置zabbix下setup.php无法显示的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: PHP提高redis命中率,怎么提高re
- 下一篇: ubuntu 编译php5.6,Ubun