1.configure:error:mysql Library not found MySQL library not found
apt-get install libmysqlclient-dev
2.configure:error:invalid Net-snmp directory-unable to find Net-snmp-config
apt-get
[attached]SNMP installation and configuration
(1) SNMP installation
Run the following two commands:
apt-get install snmp snmpd
After running smoothly, test it with the following command:
lsof-i:161
If the SNMP protocol is running, the installation OK is indicated.
(2) SNMP configuration
SNMP configuration file /etc/snmp/snmpd.conf
My goal is to make a remote SNMP connection, so I need to make the following modifications:
Take the following line: Agentaddress udp:127.0.0.1:161
Comment out, namely: #agentAddress udp:127.0.0.1:161
Then the original line: #agentAddress udp:161,udp6:[::1]:161
Remove the comment, namely: Agentaddress udp:161,udp6:[::1]:161
This enables remote monitoring of SNMP.
However, after the modified cacti server can not monitor the CPU, memory, traffic data, so need to make the following changes:
Find the following in the snmpd.conf
view systemonly included .1.3.6.1.2.1.1view systemonly included .1.3.6.1.2.1.25.1
Plus view systemonly included. 1 80 allows all devices to be monitored.
After all the modifications are complete, restart Snmp:service snmpd restart
Verify that the installation is successful, as follows:>> snmpget --version
root@kallen:/usr/share/snmp#snmpd --versionNET-SNMPversion:5.7.2Web: http://www.net-snmp.org/Email: net-snmp-coders@lists.sourceforge.net
To test whether SNMP monitors various metrics, run the following command:
-v2-cpublic localhost
If the output has a lot of pages, it should be set up successfully!
3.The Frontend does not match Zabbix database
[Cause of problem] Zabbix database version is incorrect (because SQL is imported in Zabbix-2.4)
[Workaround] First look at the version number of the current Zabbix:
[email protected]:~# 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)
Confirm and re-import the SQL 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
[Email protected]:/etc/default# vim zabbix-server# defaults file for zabbix-server-mysql#StartThe Zabbix server fromThe Init.d script?# (PossibleValues:"Yes"or"No") # This is by default Set to"No"Because a MySQLDatabaseNeeds toBe prepared# andConfiguredbeforeYou canStartThe Zabbix server forThe First Time. # instructions onHow to SetUp theDatabaseCan befound inch#/usr/share/doc/zabbix-server-mysql/readme. DebianSTART=No#AbsolutePath toThe Configuration fileconfig_file="/etc/zabbix/zabbix_server.conf"
is set to no, of course, can not start, change to Yes
root@kallen:/etc/default# service zabbix-server start17802
Installation and use of Zabbix under Ubuntu