0

0

deploy zabbix 2210 on ubuntu 1404 64bit

php中文网

php中文网

发布时间:2016-07-30 13:29:53

|

1108人浏览过

|

来源于php中文网

原创

Architecture:
Nginx
php5
mysql


Install depends

#apt-get install -y nginx php5-fpm php5-gd mysql-server php5-mysql libmysqld-dev libxml2-dev libsnmp-dev libcurl4-openssl-dev

Config php5-fpm

#/etc/php5/fpm/pool.d/www.conf...
> 33 ;listen = /var/run/php5-fpm.sock
> 34 listen = 9000#service php5-fpm restart

Config nginx

#cp /etc/nginx/sites-available/default{,.bak}#vim /etc/nginx/sites-enabled/default...24##      root /usr/share/nginx/html;25         root /var/www/html/zabbix;
 26         index index.php index.html index.htm;

...54         location ~ \.php$ {
 55                 fastcgi_split_path_info ^(.+\.php)(/.+)$;
 56#       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini57#58#       # With php5-cgi alone:59                 fastcgi_pass 127.0.0.1:9000;
 60#       # With php5-fpm:61#       fastcgi_pass unix:/var/run/php5-fpm.sock;62                 fastcgi_index index.php;
 63                 include fastcgi_params;
 64         }

...#nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

#service nginx reload

Installing Zabbix daemons

download and untar pkg

#wget http://7mnldi.com1.z0.glb.clouddn.com/zabbix-2.2.10.tar.gz#tar -xf zabbix-2.2.10.tar.gz

Create user account

#groupadd zabbix#useradd -g zabbix zabbix

Create Zabbix database

For Zabbix server and proxy daemons, as well as Zabbix frontend, a database is required. It is not needed to run Zabbix agent.
SQL scripts are provided for creating database schema and inserting the dataset. Zabbix proxy database needs only the
schema while Zabbix server database requires also the dataset on top of the schema.

For example: config mysql

shell> mysql -u<username> -p<password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> quit;
shell> mysql -u<username> -p<password> zabbix < database/mysql/schema.sql
# stophereifyouarecreatingdatabaseforZabbixproxyshell> mysql -u<username> -p<password> zabbix < database/mysql/images.sqlshell> mysql -u<username> -p<password> zabbix < database/mysql/data.sql

Having created a Zabbix database, proceed to the following steps of compiling Zabbix.

Configure the sources

When configuring the sources for a Zabbix server or proxy, you must specify the database type to be used. Only one database type can be compiled with a server or proxy process at a time.

To see all of the supported configuration options, inside the extracted Zabbix source directory run:

#./configure --help

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

#./configure--enable-server--enable-agent--with-mysql--enable-ipv6--with-net-snmp--with-libcurl--with-libxml2
note: –with-libxml2 configuration option is required for virtual machine monitoring, supported since Zabbix 2.2.0.

To configure the sources for a Zabbix server (with PostgreSQL etc.), you may run:

#./configure--enable-server--with-postgresql--with-net-snmp

To configure the sources for a Zabbix proxy (with SQLite etc.), you may run:

#./configure--prefix=/usr--enable-proxy--with-net-snmp--with-sqlite3--with-ssh2

To configure the sources for a Zabbix agent, you may run:

#./configure --enable-agent

Make and install everything

#make install

This step should be run as a user with sufficient permissions (commonly ‘root’, or by using sudo).

Running make install will by default install the daemon binaries (zabbix_server, zabbix_agentd, zabbix_proxy) in /usr/local/sbin and the client binaries (zabbix_get, zabbix_sender) in /usr/local/bin.

To specify a different location than /usr/local, use a --prefix key in the previous step of configuring sources, for example --prefix=/home/zabbix. In this case daemon binaries will be installed under /sbin, while utilities under /bin. Man pages will be installed under /share.

Review and edit configuration files

  • edit the Zabbix agent configuration file /usr/local/etc/zabbix_agentd.conf
    You need to configure this file for every host with zabbix_agentd installed.

You must specify the Zabbix server IP address in the file. Connections from other hosts will be denied.

  • edit the Zabbix server configuration file /usr/local/etc/zabbix_server.conf
    You must specify the database name, user and password (if using any).

With SQLite the full path to database file must be specified; DB user and password are not required.

The rest of the parameters will suit you with their defaults if you have a small installation (up to ten monitored hosts). You should change the default parameters if you want to maximize the performance of Zabbix server (or proxy) though. See the performance tuning section for more details.

Heeyo
Heeyo

Heeyo:AI儿童启蒙陪伴师,风靡于硅谷的儿童AI导师和玩伴

下载
  • if you have installed a Zabbix proxy, edit the proxy configuration file /usr/local/etc/zabbix_proxy.conf

You must specify the server IP address and proxy hostname (must be known to the server), as well as the database name, user and password (if using any)

With SQLite the full path to database file must be specified; DB user and password are not required.

Start up the daemons

Run zabbix_server on the server side.

#zabbix_server

Make sure that your system allows allocation of 36MB (or a bit more) of shared memory, otherwise the server may not start and you will see “Cannot allocate shared memory for .” in the server log file. This may happen on FreeBSD, Solaris 8.
See the “See also” section at the bottom of this page to find out how to configure shared memory.

Run zabbix_agentd on all the monitored machines.

#zabbix_agentd

Make sure that your system allows allocation of 2MB of shared memory, otherwise the agent may not start and you will see “Cannot allocate shared memory for collector.” in the agent log file. This may happen on Solaris 8.

If you have installed Zabbix proxy, run zabbix_proxy.

#zabbix_proxy

Installing Zabbix web interface

Copying PHP files
Zabbix frontend is written in PHP, so to run it a PHP supported webserver is needed. Installation is done by simply copying the PHP files from frontends/php to the webserver HTML documents directory.

#mkdir /var/www/html/zabbix#cd frontends/php# cp -a . /var/www/html/zabbix

Installing frontend

Step 1
In your browser, open Zabbix URL: http://<server_ip_or_name></server_ip_or_name>
You should see the first screen of the frontend installation wizard.

Step 2
Make sure that all software prerequisites are met.

    Current value   Required
PHP version5.5.9-1ubuntu4.125.3.0   OK
PHP option memory_limit 128M    128M    OK
PHP option post_max_size        8M  16M Fail
PHP option upload_max_filesize  2M  2M  OK
PHP option max_execution_time   30300 Fail
PHP option max_input_time       60300 Fail
PHP time zone                   unknown     Fail
PHP databases support           MySQL   OK
PHP bcmath                      onOK
PHP mbstring                    onOK
PHP sockets                     onOK
PHP gd                          2.1.12.0 OK
PHP gd PNG support              onOK
PHP gd JPEG support             onOK
PHP gd FreeType support         onOK
PHP libxml                      2.9.12.6.15  OK
PHP xmlwriter                   onOK
PHP xmlreader                   onOK
PHP ctype                       onOK
PHP session                     onOK
PHP session auto start          off off OK
PHP gettext                     onOK

Resolve:

#vim /etc/php5/fpm/php.ini...385#max_execution_time = 30386 max_execution_time = 300396#max_input_time = 60397 max_input_time = 300675#post_max_size = 8M676 post_max_size = 32M

 883 date.timezone ='Asia/Shanghai'

make sure like this:

    Current value   Required
PHP version5.5.9-1ubuntu4.125.3.0   OK
PHP option memory_limit 128M    128M    OK
PHP option post_max_size        32M 16M OK
PHP option upload_max_filesize  2M  2M  OK
PHP option max_execution_time   300300 OK
PHP option max_input_time       300300 OK
PHP time zone                   Asia/Shanghai   OK
PHP databases support           MySQL   OK
PHP bcmath                      onOK
PHP mbstring                    onOK
PHP sockets                     onOK
PHP gd                          2.1.12.0 OK
PHP gd PNG support              onOK
PHP gd JPEG support             onOK
PHP gd FreeType support         onOK
PHP libxml                      2.9.12.6.15  OK
PHP xmlwriter                   onOK
PHP xmlreader                   onOK
PHP ctype                       onOK
PHP session                     onOK
PHP session auto start          off off OK
PHP gettext                     onOK

Step 3
Enter details for connecting to the database. Zabbix database must already be created.

Step 4
Enter Zabbix server details.

Step 5
Review a summary of settings.

Step 6
Download the configuration file and place it under conf/.

Step 7
Finish the installation.

Step 8
Zabbix frontend is ready! The default user name is Admin, password zabbix.

ISSUES

missing libmysqld-dev

#./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2...checking for mysql_config... no
configure: error: MySQL library not found

Resolve:

#apt-get install -y libmysqld-dev

missing libxml2-dev

#./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2...checking for xml2-config... no
configure: error: LIBXML2 library not found

Resolve:

#apt-get install -y libxml2-dev

missing libsnmp-dev

#./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2...
checking for net-snmp-config... no
configure: error: Invalid Net-SNMP directory - unable to find net-snmp-config

Resolve:

#apt-get install libsnmp-dev

missing libcurl4-openssl-dev

#./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2...checking for curl-config... no
configure: error: Curl library not found

Resolve:

#apt-get install -y libcurl4-openssl-dev

On the dashboard of zabbix, it’s display:

"Zabbix server isnot running: the information displayed may notbe current."

Resolve:

#vim /var/www/html/zabbix/conf/zabbix.conf.php$ZBX_SERVER      = 'localhost';
> $ZBX_SERVER      = '192.168.22.122'; #your ip address#

版权声明:本文为博主原创文章,未经博主允许不得转载。

以上就介绍了deploy zabbix 2210 on ubuntu 1404 64bit,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

热门AI工具

更多
DeepSeek
DeepSeek

幻方量化公司旗下的开源大模型平台

豆包大模型
豆包大模型

字节跳动自主研发的一系列大型语言模型

通义千问
通义千问

阿里巴巴推出的全能AI助手

腾讯元宝
腾讯元宝

腾讯混元平台推出的AI助手

文心一言
文心一言

文心一言是百度开发的AI聊天机器人,通过对话可以生成各种形式的内容。

讯飞写作
讯飞写作

基于讯飞星火大模型的AI写作工具,可以快速生成新闻稿件、品宣文案、工作总结、心得体会等各种文文稿

即梦AI
即梦AI

一站式AI创作平台,免费AI图片和视频生成。

ChatGPT
ChatGPT

最最强大的AI聊天机器人程序,ChatGPT不单是聊天机器人,还能进行撰写邮件、视频脚本、文案、翻译、代码等任务。

相关专题

更多
pixiv网页版官网登录与阅读指南_pixiv官网直达入口与在线访问方法
pixiv网页版官网登录与阅读指南_pixiv官网直达入口与在线访问方法

本专题系统整理pixiv网页版官网入口及登录访问方式,涵盖官网登录页面直达路径、在线阅读入口及快速进入方法说明,帮助用户高效找到pixiv官方网站,实现便捷、安全的网页端浏览与账号登录体验。

797

2026.02.13

微博网页版主页入口与登录指南_官方网页端快速访问方法
微博网页版主页入口与登录指南_官方网页端快速访问方法

本专题系统整理微博网页版官方入口及网页端登录方式,涵盖首页直达地址、账号登录流程与常见访问问题说明,帮助用户快速找到微博官网主页,实现便捷、安全的网页端登录与内容浏览体验。

272

2026.02.13

Flutter跨平台开发与状态管理实战
Flutter跨平台开发与状态管理实战

本专题围绕Flutter框架展开,系统讲解跨平台UI构建原理与状态管理方案。内容涵盖Widget生命周期、路由管理、Provider与Bloc状态管理模式、网络请求封装及性能优化技巧。通过实战项目演示,帮助开发者构建流畅、可维护的跨平台移动应用。

144

2026.02.13

TypeScript工程化开发与Vite构建优化实践
TypeScript工程化开发与Vite构建优化实践

本专题面向前端开发者,深入讲解 TypeScript 类型系统与大型项目结构设计方法,并结合 Vite 构建工具优化前端工程化流程。内容包括模块化设计、类型声明管理、代码分割、热更新原理以及构建性能调优。通过完整项目示例,帮助开发者提升代码可维护性与开发效率。

25

2026.02.13

Redis高可用架构与分布式缓存实战
Redis高可用架构与分布式缓存实战

本专题围绕 Redis 在高并发系统中的应用展开,系统讲解主从复制、哨兵机制、Cluster 集群模式及数据分片原理。内容涵盖缓存穿透与雪崩解决方案、分布式锁实现、热点数据优化及持久化策略。通过真实业务场景演示,帮助开发者构建高可用、可扩展的分布式缓存系统。

92

2026.02.13

c语言 数据类型
c语言 数据类型

本专题整合了c语言数据类型相关内容,阅读专题下面的文章了解更多详细内容。

53

2026.02.12

雨课堂网页版登录入口与使用指南_官方在线教学平台访问方法
雨课堂网页版登录入口与使用指南_官方在线教学平台访问方法

本专题系统整理雨课堂网页版官方入口及在线登录方式,涵盖账号登录流程、官方直连入口及平台访问方法说明,帮助师生用户快速进入雨课堂在线教学平台,实现便捷、高效的课程学习与教学管理体验。

15

2026.02.12

豆包AI网页版入口与智能创作指南_官方在线写作与图片生成使用方法
豆包AI网页版入口与智能创作指南_官方在线写作与图片生成使用方法

本专题汇总豆包AI官方网页版入口及在线使用方式,涵盖智能写作工具、图片生成体验入口和官网登录方法,帮助用户快速直达豆包AI平台,高效完成文本创作与AI生图任务,实现便捷智能创作体验。

717

2026.02.12

PostgreSQL性能优化与索引调优实战
PostgreSQL性能优化与索引调优实战

本专题面向后端开发与数据库工程师,深入讲解 PostgreSQL 查询优化原理与索引机制。内容包括执行计划分析、常见索引类型对比、慢查询优化策略、事务隔离级别以及高并发场景下的性能调优技巧。通过实战案例解析,帮助开发者提升数据库响应速度与系统稳定性。

64

2026.02.12

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
PHP课程
PHP课程

共137课时 | 12.2万人学习

JavaScript ES5基础线上课程教学
JavaScript ES5基础线上课程教学

共6课时 | 11.3万人学习

PHP新手语法线上课程教学
PHP新手语法线上课程教学

共13课时 | 0.9万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号