Installation steps for Linux under Zabbix

Source: Internet
Author: User
Tags install php snmp

If you need to install Zabbix machines that can be networked, then you can follow the steps below to install the desired environment for configuring Zabbix.

As we all know, installing Zabbix under Linux, the required underlying environment is lamp=linux+apache+mysql+php. So let's start now!


1.yum-y Install httpd (Apache installation)


2.yum-y Install Mariadb-server mariadb (library installed)

Repository configuration

#systemctl Start Mariadb.service

#mysql-U root-p

Enter Password: # #輸入Mysql密碼, implicitly empty

MariaDB [(None)]> CREATE database Zabbix character set UTF8; # #新建數據庫zabbix, and the repository uses UTF8

MariaDB [(None)]> insert into Mysql.user (Host,user,password)

>values (' localhost ', ' Zabbix ', password (' Zabbix ')); # #新建用户zabbix, the password is Zabbix (can be modified to remember or more complicated passwords)

MariaDB [(None)]> flush privileges; # #刷新下权限

MariaDB [(None)]> grant all on zabbix.* to ' Zabbix ' @ ' localhost ' identified by ' Zabbix '; # #允许zabbix用户在本机上使用密码zabbix连接至zabbix这个数据库的所有表格

MariaDB [(None)]> flush privileges;


Import the ZABBIX database structure

# cd/usr/share/doc/zabbix-server-mysql-3.0.1

Zcat create.sql.gz | Mysql-uroot Zabbix

Modify the database root password, ROOT_PASSWD (after importing the database file, the root password to change to their own remember to live)

Mysqladmin-u Root Password root_passwd


3.yum-y Install PHP (PHP installed)

vim/var/www/html/index.php (used to detect if PHP is installed successfully)

<?php phpinfo ();? >


Yum-y Install Php-mysql php-mbstring php-bcmath PHP-GD

Php-xml Curl curl-devel net-snmp gcc net-snmp-devel perl-dbi (install PHP related plugins, because they determine whether PHP is connected to Zabbix, MySQL can be successfully threaded)


Vim/etc/httpd/conf.d/php.conf.d

Add a row

Loadmodule php5_module/ust/lib64/httpd/moudles/libphp5.so


In Systemctl restart httpd, directly open the browser to access http://ip/index.php, such as the display of your installed software and server related content, it means that PHP installation is successful


4. Installing Zabbix

Use the rpm below and install the Zabbix:

# RPM-IVH http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm


Modifying a configuration file

# vi/etc/zabbix/zabbix_server.conf

81:dbhost=localhost # #主机

91:dbname=zabbix # #数据库名称

107:dbuser=zabbix # #用户名

115:dbpassword=zabbix # #用户连接密码

305:listenip=127.0.0.1 # #数据库连接IP地址


Open Zabbix_server Service

# Systemctl Start Zabbix-server


Modifying an HTTP configuration file

# vi/etc/httpd/conf.d/zabbix.conf

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

Php_value Always_populate_raw_post_data-1

Php_value Date.timezone Asia/shanghai


Restart HTTPD Service

# systemctl Restart httpd


Modifying the configuration file requires restarting the machine:

# Vi/etc/selinux/config

Change the selinux=enforcing into a selinux=disabled.

Shutting down the firewall


Need to start database, Zabbix-server and Apache

Systemctl Start Mariadb.service

Systemctl Start Zabbix-server

Systemctl Start httpd

Open Browser Access Http://ip/zabbix

All the way next.


Zabbix display interface changed to Chinese version

vim/usr/share/zabbix/include/locales.inc.php

Change the ' zh_cn ' = = [' name ' = ' = ' (' Chinese (zh_cn) '), ' display ' = false] to True

You can change the Zabbix page into a Chinese interface.


Other than that:

On the monitored host, just install Zabbix-agent and do the following:

# RPM-IVH http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

#yum-y Install Zabbix-agent

# vim/etc/zabbix/zabbix_agentd.conf

SERVER=IP (monitor host IP)----allow monitoring of the host to obtain data

Active SERVER=IP (Monitoring host IP)----actively transmit data to the monitoring host

#systemctl Start Zabbix-agent


Finally, the Zabbix interface of the dashboard to add the monitored host information can be monitored.

This article is from the "10793382" blog, please be sure to keep this source http://10803382.blog.51cto.com/10793382/1925267

Installation steps for Linux under Zabbix

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.