Zabbix installation-nginx + php environment zabbix2.4 installation documentation

Source: Internet
Author: User
Tags snmp import database

Zabbix installation-nginx + php environment zabbix2.4 installation documentation
1. Install the dependency package
Yum-y install gcc-c ++ autoconf httpdphp mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysqlphp-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-bcmathmysql-connector-odbc mysql-devel libdbi-dbd-mysql net-snmp-develcurl-devel
2. Modify php. ini to meet zabbixserver requirements.
# Vim/etc/php. ini
Date. timezone = Asia/Shanghai
Max_execution_time= 300
Post_max_size = 32 M
Max_input_time= 300
Memory_limit = 128 M
Mbstring. func_overload = 2

3. Start mysql and httpd

4. Create zabbix running users and groups
# Groupadd-g 201 zabbix
# Useradd-g zabbix-u 201 zabbix

5. Compile and install zabbix
# Tar-zxf zabbix-2.4.2.tar.gz
#. /Configure -- prefix =/usr/local/zabbix -- enable-server -- enable-proxy -- enable-agent -- with-mysql =/usr/bin/mysql_config -- with-net-snmp -- with-libcurl
# Make & make install

Append the following records at the end of the/etc/services file:
Zabbix-agent 10050/tcp # Zabbix Agent
Zabbix-agent 10050/udp # Zabbix Agent
Zabbix-server 10051/tcp # zabbix Trapper
Zabbix-server 10051/udp # zabbix Trapper

6. Import database information and authorize
# Mysql-uroot-p
Mysql> create database zabbix characterset utf8;
Mysql> grant all on zabbix. * tozabbix @ localhost identified by 'zabbix ';

# Mysql-uzabbix-pzabbixzabbix <./database/mysql/schema. SQL
# Mysql-uzabbix-pzabbix zabbix <./database/mysql/images. SQL
# Mysql-uzabbix-pzabbix zabbix <./database/mysql/data. SQL


7. Create related directories and links
# Mkdir/var/log/zabbix
# Chown zabbix. zabbix/var/log/zabbix
# Ln-s/usr/local/zabbix/etc/zabbix
# Ln-s/usr/local/zabbix/bin/*/usr/bin/
# Ln-s/usr/local/zabbix/sbin/*/usr/sbin/

8. Add zabbix server to System Service
# Cp zabbix-2.4.2/misc/init. d/fedora/core/zabbix _ */etc/init. d
# Vim/etc/init. d/zabbix_server
BASEDIR =/usr/local/zabbix
# Vim/etc/init. d/zabbix_agentd
BASEDIR =/usr/local/zabbix

9. modify the configuration file
# Vim/etc/zabbix/zabbix_server.conf
DBName = zabbix
DBUser = zabbix
DBPassword = zabbix
LogFile =/var/log/zabbix/zabbix_server.log

10. Set zabbix to monitor yourself
# Vim/etc/zabbix/zabbix_agentd.conf
LogFile =/var/log/zabbix/zabbix_agentd.log
Server = 127.0.0.1, x. x
ServerActive = x. x: 10051
Hostname = Host Name
UnsafeUserParameters = 1

11. Copy the webpage file to the nginx website directory
# Cp-r zabbix-2.4.2/frontends/php // usr/share/nginx/html/zabbix
# Chown-R nginx. nginx/usr/share/nginx/html/zabbix/

12. Start zabbix_server and zabbix_agentd, and set Automatic startup.
# Service zabbix_server start
# Chkconfig zabbix_server on
# Service zabbix_agentd start
# Chkconfig zabbix_agentd on

13. Install zabbix on the web page


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.