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

Zabbix binary installation

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Front-end part

Pre-operation

1. Turn off the firewall

Systemctl stop firewalld

Systemctl disable firewalld

2. Close selinx

Setenforce 0

Attached: check the command of selinux and permanently close selinux

Getenforce

Vi / etc/sysconfig/selinux

Change SELINUX=enforcing to SELINUX=disabled

3. Add domain name resolution

Add a record in / etc/hosts (host ip address plus domain name)

192.168.1.5 zabbix.server

I. basic configuration

1. Use some Li Baba's mirror source to accelerate the installation of operating system software packages.

Wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

2. Install the epel-release source (including toolkits that are not included in the basic image)

Yum groups install epel-release

3. Install the common development components development tool

Yum groups install "Development Tools"

Attached: view the toolkit commands included in Development Tool (yum groups info "Development Tools")

4. Add the mirror source of zabbix

Rpm-ivh https://repo.zabbix.com/zabbix/4... .0-1.el7.noarch.rpm

5. Restart

Reboot

2. Install zabbix-server and related rpm packages

1. Install zabbix-server-mysql (server)

Yum install zabbix-server-mysql

2. Install zabbix-web-mysql (front end)

Yum install zabbix-web-mysql

3. Install mariadb-server (database service)

Yum install mariadb-server

Initialize mariadb-server

1. Start mariadb

Systemctl start mariadb

Attached: check the status, process and self-startup of mariadb

Systemctl status mariadb

Ps aux | grep mysqlchkconfig mariadb on2, initialization mariadb

Mysql_secure_installation

(1) Enter current password for root (enter for none): enter key

(2) Set root password? [Yzone] (set root password): n

(3) Remove anonymous users? [YBO] whether to remove anonymous users: y

(4) Disallow root login remotely? [YBO] whether to ban root login: n

(5) Remove test database and access to it? [YBO] whether to delete the test database: y

(6) Reload privilege tables now? [Yzone] whether to reload permissions: y

4. Create a database zabbix

1. Enter the database

Mysql-uroot-p

Enter password: enter key

2. Create database zabbix with character set of utf8

MariaDB [(none)] > create database zabbix character set utf8 collate utf8_bin

Attached: display database zabbix

MariaDB [(none)] > show databases

3. Grant the user localhost password findsec123 all permissions on the database zabbix

MariaDB [(none)] > grant all privileges on zabbix. To zabbix@localhost identified by 'zabbix@findsec123'

4. Update permissions table

MariaDB [(none)] > flush privileges

5. Exit the database

MariaDB [(none)] > quit

6. Import data structure

Zcat / usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql-uzabbix-pzabbix@findsec123 zabbix

Attached: view imported tables

(1) access to the database

Mysql-uroot-p

(2) use database zabbix

MariaDB [(none)] > use zabbix

(3) display the tables in the database zabbix

MariaDB [zabbix] > show tables

Modify the configuration file of zabbix-server

Vi / etc/zabbix/zabbix_server.confDBHost=localhost (database hostname = local host)

DBName=zabbix (database name = zabbix)

DBUser=zabbix (database user name = zabbix)

DBPassword=zabbix@findsec123 (database password) br/ > DBHost=localhost (database hostname = local host)

DBName=zabbix (database name = zabbix)

DBUser=zabbix (database user name = zabbix)

DBPassword=zabbix@findsec123 (database password)

(1) start the zabbix-server service

Systemctl start zabbix-server

(2) View zabbix-server status

Systemctl status zabbix-server

(3) View the log

Cat / var/log/zabbix/zabbix_server.log

6. Configure Zabbix front end

Vi / etc/php.ini

Max_execution_time = 300 (maximum execution time per script)

Memory_limit = 128m (maximum memory consumed by scripts)

Post_max_size = 16m (maximum value of post data that php will accept)

Upload_max_filesize = 2m (maximum value for uploading files)

Max_input_time = 300 (maximum time for each script to analyze request data)

Max_input_vars = 10000 (how many get/post/cookie input variables can be accepted)

Always_populate_raw_post_data =-1 (post raw data can be received with $HTTP_RAW_POST_DATA after [color=rgba (0,0,0,0.87)] is enabled)

Date.timezone = Asia/Shanghai (time zone)

7. Start zabbix server and httpd service

1. Start the zabbix-server service

Systemctl start zabbix-server

Attached: boot self-start

Chkconfig zabbix-server on

2. Start the httpd service

Systemctl start httpd.service

Attached: boot start

Chkconfig httpd on

Browsers such as Firefox open the zabbix interface

Http://192.168.1.5/zabbix

Webpage article

1. Open the browser

Http://192.168.1.5/zabbix

2. Welcome

3. Check prerequisites

4. Configure the database

5. Zabbix server details

6. Installation summary

At this point, the zabbix4.0 (web page) is completed.

Client section

1. Install zabbix-agent (zabbix client)

Yum install zabbix-agent

2. Start zabbix-agent

Systemctl start zabbix-agent.servicechkconfig zabbix-agent on attached: (1) View zabbix-agent configuration file

Grep-Ev'^ $| ^ #'/ etc/zabbix/zabbix_agentd.conf

(2) View the log

Cat / var/log/zabbix/zabbix_agentd.log

(3) View zabbix-agent status

Systemctl status zabbix-agent.service3, browser to open the web page

Http://192.168.1.5/zabbix

At this point, the zabbix binary installation is complete (client part)

Conclusion: complete the zabbix4.0 binary installation (front-end)

Zabbix4.0 binary installation (web page)

Zabbix4.0 binary installation (client side)

At this point, the zabbix4.0 binary installation configuration is complete.

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

Servers

Wechat

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

12
Report