Zabbix Installation and Yum mode installation

Source: Internet
Author: User
Tags php mysql snmp mysql login

System: centos6.*


First, LANMP environment deployment


Configuring the Epel Source


# RPM-IVH http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm


#yum-y install gcc gcc-c++ autoconf httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql p HP-GD php-xml php-mbstring php-ldap php-pear php-xmlrpc php-fpm php-bcmath mysql-connector-odbc mysql-devel libdbi-dbd-m Ysql Net-snmp-devel Curl-devel


Service mysqld Start

Service httpd Start

Mysqladmin Password Redhat


(1) "Source Code installation Zabbix"


#wget http://liquidtelecom.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.0.6/zabbix-2.0.6.tar.gz

#tar ZXVF zabbix-2.0.6.tar.gz


# Groupadd Zabbix

# Useradd Zabbix-g Zabbix


Mysql> CREATE database Zabbix character set UTF8;

Query OK, 1 row Affected (0.00 sec)


Mysql> Grant all on zabbix.* to [e-mail protected] identified by ' Rehat ';

Query OK, 0 rows affected (0.02 sec)


# CD Zabbx-2.0.6/database/mysql

# Mysql-uzabbix-predhat Zabbix < Schema.sql

# Mysql-uzabbix-p Zabbix < Images.sql

Enter Password:

# Mysql-uzabbix-p Zabbix < Data.sql

Enter Password:


# CD zabbix-2.0.6

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

Make && make install


Configuration parameter Description:

--enable-server Installing Zabbix Server

--enable-proxy Installing Zabbix Proxy

--enable-agent Installing the Zabbix Agent

--with-mysql using MySQL as a database server

--WITH-NET-SNMP Support for SNMP

--with-libcurl supports curl for web monitoring


Date.timezone = etc/gmt+8

Php_value Max_execution_time 300

Php_value Memory_limit 128M

Php_value post_max_size 16M

Php_value upload_max_filesize 2M

Php_value Max_input_time 300


# Cat/etc/services | grep zabbix*

Zabbix-agent 10050/tcp # Zabbix Agent

Zabbix-agent 10050/UDP # Zabbix Agent

Zabbix-trapper 10051/tcp # Zabbix Trapper

Zabbix-trapper 10051/UDP # Zabbix Trapper


# egrep-v "(#|^$)"/usr/local/zabbix/etc/zabbix_server.conf

Logfile=/tmp/zabbix_server.log

Pidfile=/tmp/zabbix_server.pid

Dbhost=localhost

Dbname=zabbix

Dbuser=zabbix

Dbpassword=redhat


# CP MISC/INIT.D/FEDORA/CORE/ZABBIX_SERVER/ETC/INIT.D

# chmod +x/etc/init.d/zabbix_server


# Vi/etc/init.d/zabbix_server

Basedir=/usr/local/zabbix # #修改这个, Zabbix installation directory

confile= $BASEDIR/etc/zabbix_server.conf # #添加这一行, defining the location of the configuration file

Action $ "Starting $BINARY _name:" $FULLPATH-C $CONFILE # #搜索start, modify startup options, default is to go to/etc down to find the configuration file


Service Zabbix_server Start


CD zabbix-2.0.6

Cp-r Frontends/php/var/www/html/zabbix

Chown-r Apache:root/var/www/html/zabbix





PS: If you encounter the following database login errors, you need to force the password change


MySQL Login error


Mysqladmin:connect to server at ' localhost ' failed

Error: ' Access denied for user ' root ' @ ' localhost ' (using Password:yes) '


Workaround: Hack the MySQL password


# Service Mysqld Stop

# Mysqld_safe--skip-grant-tables &


Enter Mysql-uroot-p return Enter

>use MySQL;

> Update user Set Password=password ("Newpass") where user= "root";

Change Password to Newpassord

> Flush Privileges; Update permissions

> Quit quitting


# Service Mysqld Restart

# Mysql-uroot-p New Password entry





(2) "Yum Style installation Zabbix"

# RPM-IVH http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm

# yum Install Zabbix-server-mysql Zabbix-web-mysql

# yum Install Zabbix-agent

# cd/usr/share/doc/zabbix-server-mysql-2.4.0/create

# Mysql-uroot Zabbix < Schema.sql

# Mysql-uroot Zabbix < Images.sql

# Mysql-uroot Zabbix < Data.sql

Php_value Max_execution_time 300

Php_value Memory_limit 128M

Php_value post_max_size 16M

Php_value upload_max_filesize 2M

Php_value Max_input_time 300

# Service httpd Restart

# Service Mysqld Restart

# Service Zabbix-server Restart

# chkconfig httpd on && chkconfig mysqld on && chkconfig zabbix-server on


This article is from "Meteor Yu" blog, please be sure to keep this source http://8789878.blog.51cto.com/8779878/1684781

Zabbix Installation and Yum mode installation

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.