2、安裝依賴庫
yum -y install net-snmp-devel libxml2-devel libcurl-devel libevent libevent-devel
3、解壓並編譯
tar -zxvf zabbix-3.4.2.tar.gz
cd zabbix-3.4.2
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql=/usr/local/mysql/bin/mysql_config --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
報錯:configure: error: mysql library not found
需手動指定mysql_config絕對路徑 :--with-mysql=/usr/local/mysql/bin/mysql_config
4、安裝
make && make install5、建立zabbix使用者和使用者組
# groupadd zabbix6、建立zabbix資料庫,並匯入表結構# useradd -r -g zabbix zabbix
# cd /usr/local && chown -r zabbix:zabbix zabbix
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to 'zabbix'@'%' identified by "zabbix";
use zabbix;7、建立日誌目錄source /root/zabbix-3.4.2/database/mysql/schema.sql;
source /root/zabbix-3.4.2/database/mysql/images.sql;
source /root/zabbix-3.4.2/database/mysql/data.sql;
# cd /usr/local/zabbix8、修改zabbix_server.conf# mkdir logs
# chown zabbix:zabbix logs
logfile=/usr/local/zabbix/logs/zabbix_server.log9、修改zabbix_agent.confpidfile=/tmp/zabbix_server.pid
dbhost=localhost
dbname=zabbix
dbuser=zabbix
dbpassword=zabbix
dbsocket=/tmp/mysql.sock
include=/usr/local/zabbix/etc/zabbix_server.conf.d/*.conf
# vim ./etc/zabbix_agentd.conf10、設定軟連線並啟動zabbix服務ln -s /usr/local/zabbix/sbin/zabbix_server /etc/init.d/zabbix_serverpidfile=/tmp/zabbix_agentd.pid
logfile=/usr/local/zabbix/logs/zabbix_agentd.log
include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/*.conf
ln -s /usr/local/zabbix/sbin/zabbix_agentd /etc/init.d/zabbix_agentd
/etc/init.d/zabbix_server
/etc/init.d/zabbix_agentd
11、拷貝zabbix專案檔案至web環境中
cp -r zabbix-3.4.2/frontends/php/ /www/zabbix
chown www.www -r /www/zabbix
12、訪問192.168.1.1/zabbix ,初始化安裝的預設賬號:admin,密碼:zabbix
13、中文亂碼解決辦法:
①去windows的文字目錄如 c:\windows\fonts或
②將字型檔案上傳到web專案zabbix的字型目錄 /www/zabbix/fonts/
③將字型重新命名test.ttf
④vim defines.inc.php 將define('zbx_graph_font_name', '被修改處')改為 test;將define('zbx_font_name', ''被修改處')改為test
⑤重新整理zabbix圖形介面,修改字型成功
zabbix原始碼安裝
1 zabbix server安裝指令碼 yum install y libevent devel wget tar gcc gcc c make net snmp devel libxml2 devel libcurl devel groupadd zabbix useradd g zabbix ...
原始碼安裝zabbix
yum install libxml2 devel net snmp devel libevent devel curl devel pcre mariadb devel php fpm configure prefix usr local zabbix enable server enable a...
原始碼編譯安裝zabbix
準本環境 centos7系統 192.168.124.204 關閉防火牆 關閉selinux yum y install vim wget 解壓安裝包並進入目錄 root localhost tar xf zabbix 4.4.0.tar.gz cd usr local zabbix 4.4.0 編...