PHP 5.5.38 + mysql 5.0.11 + zabbix3.0 + nginx 安裝

來源:互聯網
上載者:User

標籤:libcurl   建立   www   說明   frontend   logs   虛擬機器   .gz   efi   

PHP 5.5.38 + mysql 5.0.11 + zabbix3.0 + nginx

1.首先在安裝好環境下安裝 zabbix3.0情況下

2. yum install mysql-devel net-snmp-devel curl curl-devel -y

groupadd zabbix
useradd -g zabbix zabbix

3. wget -c http://ncu.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Development/3.0.0alpha2/zabbix-3.0.0alpha2.tar.gz

這裡 可以下載更高的版本,但是要注意3.0以上的某些版本要mysql5.5以上

https://www.zabbix.com/download 更多版本

4. tar xf zabbix-3.0.0alpha2.tar.gz
ln -s /usr/local/lib/libiconv.so.2 /usr/lib/libiconv.so.2
cd zabbix-3.0.0alpha2
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
make && make install 
註:―prefix=/usr/local/zabbix為指定安裝目錄為/usr/local/zabbix
―enable-server為安裝zabbix服務端程式
―enable-agent為安裝agent程式
―with-mysql為使用mysql資料庫
―enable-ipv6為啟用ipv6支援
―with-net-snmp為啟用snmp支援
―with-libcurl為啟用curl
―with-libxml2編譯xml模組,主要用於監控vm虛擬機器

5. cd /usr/local/zabbix-3.0.0alpha2/database/mysql/ 這裡一定要注意你的路徑 /usr/local/ 如果你是放在 /usr/local/ 下面

mysql -u root -p #輸入密碼,進入MySQL控制台 
create database zabbix character set utf8; #建立資料庫zabbix,並且資料庫編碼使用utf8 

/* // 使用root mysql 使用者免注釋部分
GRANT USAGE ON *.* TO ‘user01‘@‘localhost‘ IDENTIFIED BY ‘zabbix‘ WITH GRANT OPTION; #建立賬戶zabbix,密碼zabbix
flush privileges; #再次重新整理系統授權表 
grant all on zabbix.* to ‘zabbix‘@‘localhost‘ identified by ‘zabbix‘ with grant option; #允許賬戶zabbix能從本機串連到資料庫zabbix 
flush privileges; #再次重新整理系統授權表 

*/
use zabbix #進入資料庫,一定要按照sql檔案順序 
source schema.sql #匯入指令檔到zabbix資料庫 
source images.sql 
source data.sql

6.vim /usr/local/etc/zabbix_server.conf

DBName=zabbix #資料庫名稱 
DBUser=zabbix #資料庫使用者名稱 
DBPassword=zabbix #資料庫密碼 
ListenIP=127.0.0.1 #資料庫ip地址 

7.cp /usr/local/zabbix-3.0.0alpha2/misc/init.d/fedora/core/zabbix_server /etc/rc.d/init.d/zabbix_server
  cp /usr/local/zabbix-3.0.0alpha2/misc/init.d/fedora/core/zabbix_agentd /etc/rc.d/init.d/zabbix_agentd 

service zabbix_server start
service zabbix_agentd start

8.cd /usr/local/zabbix-3.0.0alpha2/frontends
  cp -rf php /application/nginx/html/zabbix //注意:: 這裡是你網站訪問的目錄下面建立 zabbix

 

9. 開啟web輸入127.0.0.1/zabbix 
出現安裝頁面。

下載1 , 更新目錄下面的zabbix.conf.php

這些都是下一步下一步 按照說明來做就行了 ,

最後記住一個:

用預設的帳號:admin,密碼:zabbix,就可以登入了

嘿嘿

中文版問題,右上方 人頭按鈕 選擇語言 

如果沒有中文 

原來zabbix預設把對中文的支援給關閉了,我們需要修改zabbix的php源檔案. 修改網站根目錄下include/locales.inc.php檔案.

<< 完 >>

 

 問題 :

Zabbix server is not running: the information displayed may not be current.

出現這樣的問題 

zabbix_server.conf 下面應該為

zabbix.conf.php.example 一致的配置,ip為localhost

 

<?php
// Zabbix GUI configuration file.
global $DB;

 

$DB[‘TYPE‘] = ‘MYSQL‘;
$DB[‘SERVER‘] = ‘localhost‘;
$DB[‘PORT‘] = ‘3306‘;
$DB[‘DATABASE‘] = ‘zabbix‘;
$DB[‘USER‘] = ‘root‘;
$DB[‘PASSWORD‘] = ‘xxxxxxx‘;

 

// Schema name. Used for IBM DB2 and PostgreSQL.
$DB[‘SCHEMA‘] = ‘‘;

 

$ZBX_SERVER = ‘localhost‘;
$ZBX_SERVER_PORT = ‘你的連接埠‘;
$ZBX_SERVER_NAME = ‘‘;

 

$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
?>

 

PHP 5.5.38 + mysql 5.0.11 + zabbix3.0 + nginx 安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.