四、Web段配置zabbix
1、输入地址:http://172.18.1.53/zabbix/setup.php
2、修改配置文件:php.ini默认加载位置是/usr/local/php-pfm/lib,并对相关参数做修改,重启PHP服务
[root@test ~]# cp php-7.2.4/php.ini-development /usr/local/php-fpm/lib/php.ini [root@zabbix lib]# vim php.ini post_max_size = 16M max_execution_time = 300 date.timezone = Asia/Shanghai
3、完成上述,还有几个问题:bcmatch,sockets,gettext(翻译)模块需要安装
4、模块安装:
a.bcmatch模块安装,使用/usr/local/php-fpm/bin/phpsize生成configure文件,进行下一步预编译
[root@test ~]# cd php-7.2.4/ext/bcmath/ [root@test bcmath]# /usr/local/php-fpm/bin/phpize Configuring for: PHP Api Version: 20170718 Zend Module Api No: 20170718 Zend Extension Api No: 320170718 [root@test bcmath]# ./configure --with-php-config=/usr/local/php-fpm/bin/php-config [root@test bcmath]# make && make install [root@test bcmath]# echo "extension=bcmath.so" >>/usr/local/php-fpm/lib/php.ini
b.安装sockets模块,
[root@test ~]# cd php-7.2.4/ext/sockets/ [root@test sockets]# /usr/local/php-fpm/bin/phpize Configuring for: PHP Api Version: 20170718 Zend Module Api No: 20170718 Zend Extension Api No: 320170718 [root@test sockets]# ./configure --enable-sockets --with-php-config=/usr/local/php-fpm/bin/php-config [root@test sockets]# make && make install [root@test sockets]# echo "extension=sockets.so" >>/usr/local/php-fpm/lib/php.ini
c.安装gettext模块,
[root@test gettext]# /usr/local/php-fpm/bin/phpize Configuring for: PHP Api Version: 20170718 Zend Module Api No: 20170718 Zend Extension Api No: 320170718 [root@test sockets]# ./configure --enable- --with-php-config=/usr/local/php-fpm/bin/php-config [root@test sockets]# make && make install [root@test sockets]# echo "extension=gettext.so" >>/usr/local/php-fpm/lib/php.ini
d.安装ldap模块,预编译时出现报错(configure: error: Cannot find ldap.h,转到此处解决:https://www.topunix.com/post-227.html)
[root@test ldap]# /usr/local/php-fpm/bin/phpize Configuring for: PHP Api Version: 20170718 Zend Module Api No: 20170718 Zend Extension Api No: 320170718 [root@test ldap]# ./configure --with-php-config=/usr/local/php-fpm/bin/php-config [root@test ldap]# make && make install [root@test ldap]# echo "extension=ldap.so" >>/usr/local/php-fpm/lib/php.ini
e.重启PHP,所有都通过(OK)
5、next——全部配置好——next
Zabbix前端已经就绪!默认的用户名是Admin,密码是zabbix。
部分转自zabbix官网:https://www.zabbix.com/documentation/3.4/zh/manual/installation/install
文章评论