Installing and using Zabbix in Ubuntu

Source: Internet
Author: User

Installing and using Zabbix in Ubuntu

1. configure: error: MySQL library not found

apt-get install libmysqlclient-dev

2.configure: error: Invalid Net-SNMP directory - unable to find net-snmp-config

apt-get install snmp snmpd

[Appendix] SNMP installation and configuration
(1) SNMP Installation
Run the following two commands:

apt-get install snmp snmpd

Run the following command to test the operation:

lsof -i:161

If the snmp protocol is running, installing zabbix on ubuntu install OK.
(2) SNMP Configuration
SNMP configuration file/etc/snmp/snmpd. conf
My goal is to establish a remote SNMP connection, so we need to make the following changes:zabbix install ubuntu
Set the following line: agentAddress udp: 127.0.0.1: 161
Comment out, that is, # agentAddress udp: 127.0.0.1: 161
Then the original line: # agentAddress udp: 161, udp6: [: 1]: 161
Remove the comment, that is, agentAddress udp: 161, udp6: [: 1]: 161
In this way, remote snmp listening can be implemented.
However, after modification, the cacti server still cannot monitor CPU, memory, install zabbix 4.4 on ubuntu 18.04 how to install zabbix on ubuntu 16.04  and traffic data. Therefore, you need to make the following changes:
Find the following in snmpd. conf:

view   systemonly  included   .1.3.6.1.2.1.1view   systemonly  included   .1.3.6.1.2.1.25.1

View systemonly supported ded. 1 80 allows listening to all devices.
After all the modifications are completed, restart snmp: service snmpd restart.
Verify whether the installation is successful, as shown below:> snmpget -- version

root@kallen:/usr/share/snmp#snmpd --versionNET-SNMP version:5.7.2Web: http://www.net-snmp.org/Email: net-snmp-coders@lists.sourceforge.net

Run the following command to locally test whether SNMP monitors various metrics:

snmpwalk -v 2c -c public localhost

If the output result contains many pages, the setting should be successful!

3.The frontend does not match Zabbix database

[Cause of problem] The database version of Zabbix is incorrect (because it imports the SQL IN THE Zabbix-2.4)
[Solution] First, check the version number of Zabbix:install zabbix ubuntu server 18.04

root@kallen:~# dpkg -l | grep zabbixii zabbix-agent 1:2.2.2+dfsg-1ubuntu1 i386 network monitoring solution - agentii zabbix-frontend-php 1:2.2.2+dfsg-1ubuntu1 all network monitoring solution - PHP front-endii zabbix-server-mysql 1:2.2.2+dfsg-1ubuntu1 i386 network monitoring solution - server (using MySQL)

After confirmation, re-import the SQL statement of the Zabbix database.
(Path under the source package: zabbix-> database-> mysql-> *. SQL)

mysql|-- data.sql|-- images.sql`-- schema.sql
root@kallen:~# mysql -uzabbix -pzabbix zabbix < schema.sqlroot@kallen:~# mysql -uzabbix -pzabbix zabbix < images.sql root@kallen:~# mysql -uzabbix -pzabbix zabbix < data.sql

4.zabbix-server stop/waiting

root@kallen:/etc/default# vim zabbix-server# defaults file for zabbix-server-mysql# Start the Zabbix server from the init.d script?# (Possible values:"yes"or"no")# This is by default set to"no" because a MySQL database needs to be prepared# and configured before you can start the Zabbix server for the first time.# Instructions on how to set up the database can be found in# /usr/share/doc/zabbix-server-mysql/README.DebianSTART=no# Absolute path to the configuration fileCONFIG_FILE="/etc/zabbix/zabbix_server.conf"

It is set to no. Of course it cannot be started. Change it to yes.

root@kallen:/etc/default# service zabbix-server startzabbix-server start/spawned, process 17802


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.