Issues that arise when compiling Zabbix

Source: Internet
Author: User
Tags snmp

Installation of Zabbix in a lamp environment some problems arise

The installation lamp is omitted.

  1. Create Zabbix users and let users not log in

    Useradd zabbix-m-s/sbin/nologin Zabbix

  2. Yum installs the following packages that require support for Zabbix

    Yum install-y crul-devel unixodbc-devel net-snmp net-snmp-devel libxml2-devel libcurl-devel mysql-devel OpenIPMI-devel p Hp-mysql Php-bcmath

  3. Download the tar package for Zabbix (address http://120.52.72.56/netcologne.dl.sourceforge.net/c3pr90ntcsf0/project/zabbix/ZABBIX% 20latest%20stable/2.4.5/zabbix-2.4.5.tar.gz)

  4. Unzip and enter the Zabbix directory

    cd/usr/local/src/zabbix-2.4.5

  5. ./configure--prefix=/usr/local/zabbix--enable-server--with-mysql--with-net-snmp--with-jabber--with-libcurl-- WITH-OPENIPMI--enable-agent--WITH-LIBXML2--with-unixodbc

  6. The problem with compiling is Configure:error:Jabber library not found

    Installing Iksemel

  7. and recompile

  8. created the Zabbix database.


    1. mysql-uroot-p123456


Create database Zabbix character set UTF8 collate utf8_bin;

Grant all on zabbix.* to ' Zabbix ' @ ' localhost ' indentified by ' Zabbix ';

Flush privileges;

Quit

9.

    1. Mysql-uzabbix-pzabbix zabbix< Database/mysql/schema.sql

    2. Mysql-uzabbix-pzabbix zabbix< Database/mysql/images.sql

    3. Mysql-uzabbix-pzabbix zabbix< Database/mysql/data.sql

10.

CP misc/init.d/fedora/core/zabbix_*/etc/init.d/

-------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------

  1. set Execution permission "chmod 755/etc/init.d/zabbix*"

  2. Modify The startup script filefor the server "Vim/etc/init.d/zabbix_server" tochange the value of "basedir=" inside the./ Configure prefix The specified value when

  3. Modify The agent 's startup script file "vim/etc/init.d/zabbix_agentd" tochange the value of "basedir=" to thesame as above

  4. Modify the service-side profile "vim/usr/local/zabbix/etc/zabbix_agentd.conf" to change the address behind the server= to the server's IP Address

  5. Modify the configuration file "vim/usr/local/zabbix/etc/zabbix_server.conf" on the server tomodify the following configuration, open the comment if it is a comment, and change its value

listenport=10051 # This is the port number for server-side snooping

Logfile=/tmp/zabbix_server.log # specifying the location of the log file

Dbhost=localhost # Specify the location of the database, if it is a remote server, that writes the IP address

Dbname=zabbix # Specify access to the database name, using the name of the database we just created

Dbuser=zabbix # Specifies the user name when accessing the database

Dbpassword=zabbix # Specifies the password when accessing the database

Dbsocket=/tmp/mysql.sock # If it is a remote server, disable it here, if it is local, open and make sure the path to the sock file is correct

dbport=3306 # Here is the port number for the specified database

remark: if open Zabbix appears /usr/local/zabbix/sbin/zabbix_server:error while loading shared libraries: Libiksemel.so.3:cannot Open Sharedobject file:no such file or directory

Well, you need to install it in your Iksemel in the path

Ln-s/usr/local/lib/libiksemel.so.3/usr/lib/libiksemel.so.3

6. Start Zabbix Two processes


7. PHP databases support error appears in the browser, and I have found a lot of information on the Internet.

At first, Yum Install-y php-mysql a little bit, it didn't work out.

When installing mysqli

First, enter the following directory in the PHP compilation installation package

Cd/usr/local/src/php-5.2.14/ext/mysqli


8. In implementing

/usr/local/php/bin/phpize9. Compiling./configure--with-php-config=/usr/local/php/bin/php-config-- Enable-embedded-mysqli=shared--with-mysqli=/usr/local/mysql/bin/mysql_config10. Modify the php.ini file and put the mysqli.so you have just installed in extension=mysqli.so11. Restart Apache solution. 12. PHP Bamath error occurred, same as CD/USR/LOCAL/SRC/PHP-5.2.14/EXT/BCMATH13./USR/LOCAL/PHP/BIN/PHPIZE14. ./configure--with-php-config=/usr/local/php/bin/php-config15.make&&make Install

16.

Modify the php.ini file and put the mysqli.so you have just installed in EXTENSION=BCMATH.SO17. Restart Apache solution.


This article from "Liuliulinux" blog, declined reprint!

Issues that arise when compiling Zabbix

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.