Source Installation Zabbix Service

Source: Internet
Author: User
Tags snmp

Before installing the Zabbix service, first of all, we build a good lamp environment or LNMP environment, where I set up the environment for the lamp environment, how to build the lamp environment I mentioned earlier in the article, Poke here to see the lamp environment installation, OK, then start to prepare to install Zabbix


Zabbix Service Installation



After installing the lamp environment need to configure the php.ini file, after installing lamp php.ini file directory is/usr/local/php/etc/php.ini

Modify some of these parameters to read as follows:

Max_execution_time = 300

Memory_limit = 128M

Post_max_size = 16M

Upload_max_filesize = 2M

Max_input_time = 300

Date.timezone = PRC


Also install the SNMP plugin (install plugin for compiling Zabbix error)

Yum-y Install Net-snmp-devel



Installing Zabbix

Download Zabbix

All versions: http://www.zabbix.com/download.php

Here is the version 2.2.2, uploaded to the root root directory via FTP

TAR-XZVF zabbix-2.2.2.tar.gz

CD zabbix-2.2.2

./configure--prefix=/usr/local/zabbix-2.2.2/--enable-server \

--enable-agent--with-mysql--with-net-snmp--with-libcurl--with-libxml2



(This error occurs: Configure:error:Invalid net-snmp directory-unable to find Net-snmp-config


When compiling and installing Zabbix, the configuration times above error, causing the detection system environment is not successful. Tip Unableto Find Net-snmp-config, which explains the absence of related dependencies.

This is because, in Linux, most of the software is open source and free to use. So we can use the other software packages when we are developing, we take them directly, we don't have to rewrite them at the time of the effort, which creates the so-called dependency.

So how to solve the problem then?

Solution One:

Find out which package Net-snmp-config belongs to and install it.

Yum Search Net-snmp-config, found that net-snmp-config belongs to the package Net-snmp-devel,yum install the package to resolve the issue.

Solution Two:

At the time of configuration, we added the--WITH-NET-SNMP option, so we need to check whether the system environment has the package support. Therefore, when configuring, do not add--with-net-snmp This option will not report the following error Configure:error:Invalid Net-snmp directory-unable to find Net-snmp-config. )


(Error Configure:error:Curl Library not found

First Use yum-y install *curl* installation need to build, and then recompile


Make

Make install


Create user

For security reasons, Zabbix only runs with a normal user, and if your current user is called ASD, then you run it and he runs with the ASD identity. But if you run Zabbix in the root environment, then Zabbix will actively use the Zabbix user to run it. But if your system does not have a user named Zabbix, you need to create a user, as follows:

# Groupadd Zabbix

# useradd-g Zabbix Zabbix



Initializing the database

Zabbix server and proxy require a database, angent not required. In particular, it is important to note that proxy imports only one SQL file, and the server Imports 3 SQL files altogether. I was building a proxy when I imported 3 SQL, resulting in an error. Later found that proxy only need to import a table structure.


I imagine you installed MySQL, username root, password is xxxxxx

# mysql-uroot-pxxxxxx

Mysql> CREATE DATABASE Zabbix default CharSet UTF8;

Mysql> quit;

Executed under the root directory after Zabbix decompression

# mysql-uroot-pxxxxxx Zabbix < Database/mysql/schema.sql

# mysql-uroot-pxxxxxx Zabbix < Database/mysql/images.sql

# mysql-uroot-pxxxxxx Zabbix < Database/mysql/data.sql



Configure Zabbix

Configure Zabbix_server configuration file, Zabbix source directory

# CD/USR/LOCAL/ZABBIX-2.2.2/ETC

#vim zabbix_server.conf

Dbname=zabbix

Dbuser=root

dbpassword=wdlinux.cn

dbport=3306

# Mkdir/etc/zabbix

# CP zabbix_server.conf/etc/zabbix/


Start Zabbix

/usr/local/zabbix-2.2.2/sbin/zabbix_server

/usr/local/zabbix-2.2.2/sbin/zabbix_agentd


Set power-on self-boot

You can use Echo-e "/usr/local/zabbix-2.2.2/sbin/zabbix_server\n/usr/local/zabbix-2.2.2/sbin/zabbix_agentd" >>/etc /rc.local


Copy front-end files

# mkdir/usr/local/apache2/htdocs/zabbix/

# cp-a/usr/local/src/zabbix-2.2.2/frontends/php/*/usr/local/apache2/htdocs/zabbix/



Start Web Configuration

http://192.168.1.100/zabbix/



All the way down to the end no problem, login account/password: Admin/zabbix


This article is from the "Lemon" blog, be sure to keep this source http://xianglinhu.blog.51cto.com/5787032/1630558

Source Installation Zabbix Service

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.