Zabbix compilation and installation

Source: Internet
Author: User
Tags php mysql snmp import database

1. Install components


Yum install make mysql-server httpd php mysql-devel gcc net-snmp-devel curl-devel perl-DBI php-gd php-mysql php-bcmath php-mbstring php-xml-y


Useradd zabbix


2. Start mysql

Service mysqld start

Mysqladmin-u root password root set the account and password of the mysql database administrator

Mysql-u root-p


Enter the password root

3. Create a zabbix Database

Mysql> create database zabbix character set utf8;

Mysql> grant all on zabbix. * TO [email protected] 'localhost' identified by 'zabbixpass'; authorize the local machine TO access the database with the zabbix account and password zabbixpass

Mysql> flush privileges;

4. Import Database SQL

Zabbix-2.4.1/database/mysql

Mysql-h localhost-uroot-proot zabbix <schema. SQL here zabbix and zabbixpass should be used to import SQL files. Because the root account is the administrator account, it can be directly used to connect to the local database.


Mysql-h localhost-uroot-proot zabbix <images. SQL here zabbix and zabbixpass should be used to import SQL files

Mysql-h localhost-uroot-proot zabbix <data. SQL here zabbix and zabbixpass should be used to import SQL files

5. Adjust the current time (if this time is correct, do not adjust it)

Date-s "20:48:55"

6. Compile and install

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

Make & make install

7. Add a port

Vim/etc/services


Zabbix-agent 10050/tcp # Zabbix Agent

Zabbix-agent 10050/udp # Zabbix Agent

Zabbix-trapper 10051/tcp # Zabbix Trapper

Zabbix-trapper 10051/udp # Zabbix Trapper


8. Modify the configuration file

Modify/etc/httpd/conf/httpd. conf

DirectoryIndex index.html. var index. php

Modify the/usr/local/zabbix/etc/zabbix_server.conf parameter:

DBName = zabbix

DBUser = zabbix account used to connect to the database, which corresponds to the Mysql authorized account

DBPassword = password for zabbixpass to connect to the database, which corresponds to the password of the Mysql authorized account


Cp misc/init. d/fedora/core5/zabbix_server/etc/init. d/

Cp misc/init. d/fedora/core5/zabbix_agentd/etc/init. d/

Chmod 700/etc/init. d/zabbix _*



Vim/etc/init. d/zabbix_server

Modify

ZABBIX_BIN = "/usr/local/sbin/zabbix_server"

Is

ZABBIX_BIN = "/usr/local/zabbix/sbin/zabbix_server"

Vim/etc/init. d/zabbix_agentd

Modify

ZABBIX_BIN = "/usr/local/sbin/zabbix_agentd"

Is

ZABBIX_BIN = "/usr/local/zabbix/sbin/zabbix_agentd"

9. Start the service and set startup

/Etc/init. d/zabbix_server start

/Etc/init. d/zabbix_agentd start



Chkconfig zabbix_server on

Chkconfig zabbix_agentd on

10. Modify php parameters

# Vi/etc/php. ini: find the following items and change them to the following values. There is a; number to be deleted.

Max_execution_time= 300

Max_input_time= 300

Date. timezone = PRC

Post_max_size = 32 M



Restart httpd

/Etc/init. d/httpd restart


11. Configure the php file

# Cd zabbix-2.4.1

# Cd frontends/

# Cp-rf php/var/www/html/

# Cd/var/www/html

# Mv php zabbix

# Chown-R zabbix: zabbix


Log on to http: // 192.168.195.128/zabbix



This article is from the "focus on Oracle Performance Tuning" blog. For more information, contact the author!

Zabbix compilation and 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.