Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation steps of zabbix under Linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

If you need the machine with zabbix installed to be connected to the Internet, you can follow my steps below to install the environment needed to configure zabbix.

As we all know, the underlying environment required to install zabbix under Linux 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 (data installed)

Database configuration

# systemctl start mariadb.service

# mysql-u root-p

Enter password: # # enter the Mysql password, default is empty

MariaDB [(none)] > create database zabbix character set utf8; # # create a new database zabbix and use utf8 for multiple databases

MariaDB [(none)] > insert into mysql.user (Host,User,Password)

> values ('localhost','zabbix',password (' zabbix')); # # create a user zabbix with a password of zabbix (you can change it to a password that you remember or something more complicated)

MariaDB [(none)] > flush privileges; # # refresh permissions

MariaDB [(none)] > grant all on zabbix.* to 'zabbix'@'localhost' identified by' zabbix'; # # allows zabbix users to connect to all tables in the zabbix database locally using the password zabbix

MariaDB [(none)] > flush privileges

Import zabbix database structure

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

Zcat create.sql.gz | mysql-uroot zabbix

Change the database root password, root_passwd (after importing the database file, change the root password to your own)

Mysqladmin-u root password root_passwd

3.yum-y install php (install php)

Vim / var/www/html/index.php (used to detect whether php is installed successfully)

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 the relevant plug-ins for php, as they determine whether php can be concatenated successfully with zabbix and mysql)

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

Add a row

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

In systemctl restart httpd, open the browser directly to access http://ip/index.php. If the software you installed and the relevant contents of the server are displayed, the php installation is successful.

4. Install zabbix

Use rpm and install zabbix below:

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

Modify the configuration file

# vi / etc/zabbix/zabbix_server.conf

81:DBHost=localhost # # Host

91:DBName=zabbix # # Database name

107:DBUser=zabbix # # user name

115:DBPassword=zabbix # # user connection password

305:ListenIP=127.0.0.1 # # Database connection IP address

Enable the zabbix_server service

# systemctl start zabbix-server

Modify 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 the httpd service

# systemctl restart httpd

Restarting the machine is required to modify the configuration file:

# vi / etc/selinux/config

Change SELINUX=enforcing to SELINUX=disabled

Turn off the firewall

Database, zabbix-server and apache need to be started

Systemctl start mariadb.service

Systemctl start zabbix-server

Systemctl start httpd

Open a browser to access http://ip/zabbix

Just next all the way.

Change the zabbix display interface to the Chinese version

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

Change the false of 'zh_CN' = > [' name' = > _ ('Chinese (zh_CN)'), 'display' = > false] to true

You can change the zabbix page into a Chinese interface.

In addition:

You only need to install zabbix-agent on the monitored host 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 (monitoring host ip)-allows the monitoring host to obtain data

Active server=ip (monitoring host ip)-actively transmits data to the monitoring host

# systemctl start zabbix-agent

Finally, add the information of the monitored host to the dashboard of the zabbix interface and it can be monitored.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report