Zabbix Documentation 3.0
admin
2023-05-18 08:21:58
0



1 Create user account

shell>groupadd zabbix

shell>useradd -g zabbix zabbix


2 Create Zabbix database

Database creation scripts

Scripts


MySQL


shell> mysql -uroot -p

mysql> create database zabbix character set utf8 collate utf8_bin;

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '';

mysql> flush privileges;

mysql> quit;


Installation from sources

3 Installing Zabbix daemons

shell>tar -zxvf zabbix-3.0.0.tar.gz

shell> cd database/mysql

shell> mysql -uzabbix -p zabbix < schema.sql

# stop here if you are creating database for Zabbix proxy

shell> mysql -uzabbix -p zabbix < p_w_picpaths.sql

shell> mysql -uzabbix -p zabbix < data.sql



databases 'zabbix' pssword 'password'



4 Configure the sources

To configure the sources for a Zabbix server and agent, you may run something like:

shell>./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

5 Make and install everything

shell>make install


6 Review and edit configuration files

edit the Zabbix agent configuration file /usr/local/etc/zabbix_agentd.conf

shell> vim /usr/local/zabbix/etc/zabbix_agentd.conf#指定server地址

Server=127.0.0.1

ServerActive=127.0.0.1

Hostname=Zabbix server#Hostname是唯一的,不能重复

edit the Zabbix server configuration file /usr/local/etc/zabbix_server.conf

shell>vim /usr/local/zabbix/etc/zabbix_server.conf#指定数据库用户名、密码

ListenPort=10051

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=zabbix

DBSocket=/var/lib/mysql/mysql.sock

DBPort=3306



7 Start up the daemons

Run zabbix_server on the server side.

shell> /usr/local/zabbix/sbin/zabbix_server

zabbix_server: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory


shell>ln -s /usr/local/mysql/lib/libmysqlclient.so.20  /usr/lib64/


Run zabbix_agentd on all the monitored machines.

shell> /usr/local/zabbix/sbin/zabbix_agentd


8 Installing Zabbix web interface

shell>mkdir /zabbix

shell>cd ~/zabbix-3.x.x/frontends/php

shell>cp -a . /zabbix


9 Installing frontend

In your browser, open Zabbix URL: http:///zabbix


You should see the first screen of the frontend installation wizard.

输入用户名:Admin密码:zabbix可以正常访问


Editing PHP configuration for Zabbix frontend

php.ini路径可以访问php测试页得到test.php

echo phpinfo();

?>


In php.ini:

date.timezone = Asia/Shanghai

memory_limit = 128M

post_max_size = 16M

upload_max_filesize = 2M

max_execution_time = 300

max_input_time = 300

session.auto_start = 0.

mbstring.func_overload = 0.


安装Zabbix3.X后首页报错

123A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->proce***equest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpMemoryLimit() → str2mem() in include/func.inc.php:410]A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->proce***equest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpPostMaxSize() → str2mem() in include/func.inc.php:410]A non well formed numeric value encountered [zabbix.php:21 → require_once() → ZBase->run() → ZBase->proce***equest() → CView->getOutput() → include() → make_status_of_zbx() → CFrontendSetup->checkRequirements() → CFrontendSetup->checkPhpUploadMaxFilesize() → str2mem() in include/func.inc.php:410]


这是因为PHP7.1X类型强化,解决方法如下

sed -i '/$last = strtolower(substr($val, -1));/a$val = substr($val,0,-1);' /zabbix/include/func.inc.php

注意Zabbix Web路径即可

相关内容

热门资讯

莫斯科咖啡馆爆炸案:传俄军高官... 综合法媒BFM、Franceinfo新闻台报道,当地时间8月1日晚,俄罗斯首都莫斯科市中心知名高档意...
特朗普:霍尔木兹海峡已有协议,... 财联社8月3日电,美国总统特朗普表示,霍尔木兹海峡已有协议,无核化也将达成协议。正在以谈判的形式与伊...
中国地震局启动四级应急响应,现... 据中国地震台网正式测定,2026年8月3日2时21分,在四川宜宾市高县(北纬28.54度,东经104...
以称内塔尼亚胡通过特朗普社媒得... △特朗普社交媒体发文截图总台记者当地时间2日获悉,多名以色列官员称,在美国取消针对伊朗的既定袭击计划...
500左右的手柄怎么选?swi... 现在游戏手柄早已成为热门数码外设,跟风入手的玩家数不胜数,但不清楚500左右的手柄怎么选的人同样不在...
原创 美... 2026年1月1日,美国太空探索技术公司“星链”工程副总裁迈克尔尼科尔斯高调宣布,计划2026年降低...
原创 全... 现在的屏幕设计,拥有两大类型,分别是折叠屏、直板机,而类型之间拥有多种形态。其中的折叠屏,拥有阔折叠...
原创 流... 最近,通信圈的两则消息引发了轩然大波。一方面,中国电信宣布自8月1日起全面停止第三方互联网渠道的办卡...
伊朗重申霍尔木兹海峡不会恢复至... △伊朗外交部发言人巴加埃(资料图)当地时间2日,伊朗外交部发言人巴加埃表示,伊方重申,霍尔木兹海峡的...
伊朗外长:与阿曼谈判接近完成 △伊朗外交部长阿拉格齐(中)当地时间8月2日,伊朗外交部长阿拉格齐在政府内阁会议上介绍伊朗与阿曼谈判...