Installation of Zabbix in a lamp environment some problems arise
The installation lamp is omitted.
Create Zabbix users and let users not log in
Useradd zabbix-m-s/sbin/nologin Zabbix
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
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)
Unzip and enter the Zabbix directory
cd/usr/local/src/zabbix-2.4.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
The problem with compiling is Configure:error:Jabber library not found
Installing Iksemel
and recompile
created the Zabbix database.
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.
Mysql-uzabbix-pzabbix zabbix< Database/mysql/schema.sql
Mysql-uzabbix-pzabbix zabbix< Database/mysql/images.sql
Mysql-uzabbix-pzabbix zabbix< Database/mysql/data.sql
10.
CP misc/init.d/fedora/core/zabbix_*/etc/init.d/
-------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
set Execution permission "chmod 755/etc/init.d/zabbix*"
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
Modify The agent 's startup script file "vim/etc/init.d/zabbix_agentd" tochange the value of "basedir=" to thesame as above
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
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