Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Zabbix is installed by apt-get on Ubuntu 14.04

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

[edit] installation

Install Apache, Mysql, Php, zabbix

Sudo apt-get update sudo apt-get install apache2 mysql-server libapache2-mod-php5 php5-gd php5-mysql php5-common zabbix-server-mysql zabbix-frontend-php

[edit] server configuration [edit] configure database connection sudo vim / etc/zabbix/zabbix_server.conf

Modify correlation

DBName=zabbixDBUser=zabbixDBPassword=zabbix# is not required, but it is recommended that StartDiscoverers=5 [Edit] create mysql account mysql-u root-pmysql > create user 'zabbix'@'localhost' identified by' zabbix';mysql > create database zabbix default character set utf8;mysql > grant all privileges on zabbix.* to 'zabbix'@'localhost';mysql > flush privileges;mysql > exit; [Edit] Import initialization data cd / usr/share/zabbix-server-mysql/sudo gunzip * .gzmysql-u zabbix- p zabbix

< schema.sqlmysql -u zabbix -p zabbix < p_w_picpaths.sqlmysql -u zabbix -p zabbix < data.sql[编辑] 修改 PHP 参数sudo vim /etc/php5/apache2/php.ini 修改项: post_max_size = 16Mmax_execution_time = 300max_input_time = 300date.timezone = "Asia/Shanghai" wwwwww [编辑] 配置网页sudo cp /usr/share/doc/zabbix-frontend-php/examples/zabbix.conf.php.example /etc/zabbix/zabbix.conf.phpsudo vim /etc/zabbix/zabbix.conf.php 修改项 $DB['DATABASE'] = 'zabbix';$DB['USER'] = 'zabbix';$DB['PASSWORD'] = 'zabbix' 配置apache sudo cp /usr/share/doc/zabbix-frontend-php/examples/apache.conf /etc/apache2/conf-available/zabbix.confsudo a2enconf zabbix.confsudo a2enmod aliassudo service apache2 restart[编辑] 配置 zabbix server 启动sudo vim /etc/default/zabbix-server 修改项: START=yes 启动: sudo service zabbix-server start[编辑] 本机监控sudo apt-get install zabbix-agentsudo service zabbix-agent restart[编辑] 访问http://xxx.xxx.xxx.xxx/zabbix 缺省的账户: Username = adminPassword = zabbix[编辑] 客户端配置sudo apt-get install zabbix-agent 修改配置 sudo vim /etc/zabbix/zabbix_agentd.conf 调整项 Server=127.0.0.1 #修改为 zabbix server 服务器的IP,如果有网关或被监控机为虚拟机也加上母机的IPServerActive=127.0.0.1 #修改为 zabbix server 服务器的IPHostname=Zabbix server #修改为网页里面添加的Hostname,需要保持一致。 中文显示 sudo apt-get install language-pack-zh-hans zabbix是一个多语言监控系统,默认使用英文并且也支持中文语言,详见《zabbix汉化方法》,但是近期有人反映说zabbix里面看不到中文语言.请往下看 zabbix不支持中文图 zabbix中文 开启zabbix对中文的支持 原来zabbix默认把对中文的支持给关闭了,我们需要修改zabbix的php源文件. 修改站点根目录下include/locales.inc.php文件. 1 2 3 4 5 6 7 8 9 10 11 # vim include/locales.inc.php function getLocales() { return array( 'en_GB' =>

Array ('name' = > _ (' English (en_GB)'), 'display' = > true)

'en_US' = > array (' name' = > _ ('English (en_US)'), 'display' = > true)

'bg_BG' = > array (' name' = > _ ('Bulgarian (bg_BG)'), 'display' = > true)

'zh_CN' = > array (' name' = > _ ('Chinese (zh_CN)'), 'display' = > true)

/ / originally this is false, please change it to true

. The code is omitted.

);

}

Source: https://www.ttlsa.com/zabbix/zabbix-display-chinese/

Chinese garbled code

1. The historical record office appears. Garbled code:

Cause of occurrence:

The default character set of mysql database is latin1, while zabbix needs to use utf8. No specific character set is specified when initializing the creation of zabbix library. When three tables are poured in, the default character set of Mysql will be inherited, so garbled code will occur here.

Solution:

1. Back up the tables in the zabbix database

2. Delete zabbix database manually

3. Manually specify the character set as utf8 when recreating the zabbix library

4. Replace the table character set with latin1 in the inverted sql file with utf8.

5. Just pour the backed-up zabbix library back into it.

At this point, revisit the zabbix web page, click the menu a few times, and everything is fine in the history.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report