Installation configuration for CentOS 6.5 under Zabbix

Source: Internet
Author: User
Tags snmp tru64

1. Ensure that the development environment lamp is installed

2. Download Zabbix

Official: http://www.zabbix.com/download.php

Choose the version that corresponds to your system and choose to install the zabbix-2.2.2 version corresponding to the Linux kernel for 2.6

Unzip

#tar-ZXVF zabbix-2.2.2.tar.gz

#cd zabbix-2.2.2

3. Install the required components

#yum install-y Curl curl-devel net-snmp SNMP net-snmp-devel perl-dbi php-gd php-xml php-bcmath php-mbstring

4.zabbix Database Creation Import

mysql> CREATE DATABASE Zabbix;

Mysql> grant all privileges in zabbix.* to [email protected] '% ' identified;

mysql> flush Privileges;

Mysql> Source/root/zabbix-2.2.2/database/mysql/schema.sql

Mysql> Source/root/zabbix-2.2.2/database/mysql/data.sql

Mysql> Source/root/zabbix-2.2.2/database/mysql/images.sql

5. compiling the installation parameters

#./configure--prefix=/usr/local/zabbix--enable-server--enable-agent--enable-proxy--with-mysql--enable-net-snmp --with-libcurl

#make && make Install

6. Add the Zabbix service corresponding port (can be omitted), the general system has already existed, if not can be added as follows

#vim/etc/service

Zabbix-agent 10050/TCP//Client

Zabbix-agent 10050/UDP

Zabbix-trapper 10051/tcp//Service side

Zabbix-trapper 10051/UDP

7. provide startup scripts and configuration files for Zabbix

(1) Test Zabbix service Start-up

#/usr/local/zabbix/sbin/zabbix_agentd//Client

#/usr/lcoal/zabbix/sbin/zabbix_server//Service side

To view ports:

#netstart-TNLP | grep ' Zabbix '

To stop the Zabbix service:

#pkill Zabbix

(2) Provide boot-up script for Zabbix:

#mkdir-V/etc/zabbix

#cp/root/zabbix-2.2.2/misc/init.d/tru64/zabbix_agentd/etc/init.d///Client

#cp/root/zabbix-2.2.2/misc/init.d/tru64/zabbix_server/etc/init.d///server

#chmod 777/etc/init.d/zabbix*

(3) Modify the location of the ZABBIX_AGENTD, zabbix_server program directory:

#vim/etc/init.d/zabbix_agentd

Daemon=/usr/local/zabbix/sbin/zabbix_agentd

#vim/etc/init.d/zabbix_server

Daemon=/usr/local/zabbix/sbin/zabbix_server

To start the Zabbix service:

#service Zabbix_agentd Start

#service zabbix_server Start

Add Turn on Start

#chkconfig--add Zabbix_server

#chkconfig--add Zabbix_agentd

(4) Since the Zabbix_server service does not support Chkconfig, use the following methods to start from:

Add the following code corresponding to the/ETC/INIT.D/ZABBIX_AGENTD and/etc/init.d/zabbix_server files, respectively:

#chkconfig: 345 95 95//Three parameters: 345 for different level runs, second parameter: Start priority 95, third parameter: Close priority 95

(5) Then set the self-start

Add this service #chkconfig--add zabbix_server//Services list

#chkconfig--add Zabbix_agentd

#chkconfig Zabbix_server on

#chkconfig Zabbix_agentd on

8. Edit the Zabbix related configuration file

#vim/usr/local/zabbix/zabbix_agentd.conf

Logfile=/tmp/zabbix_agentd.log//client log files

server=127.0.0.1

Hostname=zabbix Server

#vim/usr/local/zabbix/zabbix_server.conf

Logfile=/tmp/zabbix_server.log//service-side log files

dbhost=192.168.0.240//Server IP

Dbname=zabbix//zabbix Database name

Dbuser=root//zabbix Database Login user

9. Provide Zabbix Web files

#mkdir-V/var/www/html/zabbix

#cp zabbix-2.2.2/frontends/php/*/var/www/html/zabbix

In the browser input: Http://ip/zabbix

Then continue with the Web page configuration Zabbix

If there is an error on the page, then modify the corresponding value in/etc/php.ini.

#vi/etc/php.ini

Max_input_time = 600

Max_execution_time = 300

Date.timezone = Asia/shanghai

Post_max_size = 32M

Memory_limit = 128M

Until all are properly configured to complete, show OK, until this zabbix is really built to complete

Default login username admin, password is Zabbix

If the page tip is missing "mbstring":P hp mbstring Extension Missing (PHP configuration parameter--enable-mbstring).

Workaround: #yum install-y php-mbstring

And then all the way "Next":

To the fifth step: 5. Pre-installation Summary need to download the configuration file and save it to the/var/www/html/zabbix/conf/under the server,

The name must be zabbix.conf.php, then "Retry", click "Finish" to complete the installation.

Configuration complete, the login interface appears, the default user is admin, password is: Zabbix

If you are on a browser error: Zabbix server is not running:be information displayed may isn't being current.

Workaround: Modify/var/www/html/zabbix/conf/zabbix.conf.php

$ZBX _server = ' 192.168.0.240 '; Modify IP for server IP, non-127.0.0.1

Installation configuration for CentOS 6.5 under Zabbix

Related Article

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.