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 and deployment of zabbix3.4 monitoring system

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

Share

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

1. Change host name

vim /etc/hostname, modified to zabbix-server

2. network card configuration

vim /etc/sysconfig/network-scripts/ifcfg-eno16780032

3. Turn off firewalls and selinux

systemctl stop firewalld.service

systemctl disable firewalld.service

4. Close selinux

vim /etc/selinux/config, modified to: SELINUX=disabled

5. Initialize the system (kernel optimization, etc., optional)

6. Configure yum source

rpm -Uvh https://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

yum clean all

yum makecache

7. Install zabbix server

yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

8. Start zabbix-server zabbix-agent httpd

systemctl restart zabbix-server zabbix-agent httpd

systemctl enable zabbix-server zabbix-agent httpd

9. Download Database Server and Client

wget https://cdn.mysql.com/archives/mysql-5.6/MySQL-server-5.6.43-1.el7.x86_64.rpm

wget https://cdn.mysql.com//Downloads/MySQL-5.6/MySQL-client-5.6.43-1.el7.x86_64.rpm

10. Database server and client installation

rpm -ivh MySQL-server-5.6.43-1.el7.x86_64.rpm --force -nodeps

rpm -ivh MySQL-client-5.6.43-1.el7.x86_64.rpm --force --nodeps

11. Create related directories and directory authorizations

mkdir -p /data/mysql/

chown -R mysql.mysql /data/mysql/

12. Modify database profiles

vim /etc/my.cnf

[client]

port = 3306

socket = /data/mysql/mysql.sock

[mysqld]

user = mysql

port = 3306

character-set-server = utf8

default-storage-engine = InnoDB

socket = /data/mysql/mysql.sock

pid-file = /data/mysql/mysql.pid

# DATA STORAGE #

datadir = /data/mysql/

innodb_data_file_path = ibdata1:1024M:autoextend

innodb_data_home_dir = /data/mysql/

innodb_log_group_home_dir = /data/mysql/

# LOGGING #

log-error = /data/mysql/mysql-error.log

log-queries-not-using-indexes = 0

slow-query-log = 1

long_query_time = 2

slow-query-log-file = /data/mysql/mysql-slow.log

lower_case_table_names = 1

skip-grant-tables

13. initialize the database

/usr/bin/mysql_install_db --user=mysql --datadir=/data/mysql --pid-file=/data/mysql/mysql.pid

14. Start database and set root password

/etc/init.d/mysql restart

mysqladmin -h 127.0.0.1 -uroot -p password

15. login database, mysql -uroot -p

16. Create zabbix database zabbix database password is zabbix

create database zabbix character set utf8 collate utf8_bin;

grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'

17. import database

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

18. Edit Zabbix front-end PHP configuration, mainly change time zone

vim /etc/httpd/conf.d/zabbix.conf

Modify this line: php_value date.timezone Asia/Shanghai

systemctl restart httpd

19. Browser access and configuration

http://192.168.8.133/zabbix/

20. Modify to Chinese interface

Find the corresponding user under Adminstration-->Users, click it, find Language, select Chinese (zh_CN), after updating, refresh the page to switch to Chinese interface.

21. zabbix client installation configuration

centos7:

rpm -Uvh https://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

yum -y install zabbix-agent

systemctl enable zabbix-agent

sed -i 's/Server=127.0.0.1/Server=192.168.8.133/' /etc/zabbix/zabbix_agentd.conf

sed -i 's/ServerActive=127.0.0.1/ServerActive==192.168.8.133/' /etc/zabbix/zabbix_agentd.conf

echo "192.168.8.133 Zabbix server" >> /etc/hosts

systemctl restart zabbix-agent

centos6:

rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/6/x86_64/zabbix-release-3.4-1.el6.noarch.rpm

yum install zabbix-agent

chkconfig zabbix-agent on

sed -i 's/Server=127.0.0.1/Server=192.168.8.133/' /etc/zabbix/zabbix_agentd.conf

sed -i 's/ServerActive=127.0.0.1/ServerActive==192.168.8.133/' /etc/zabbix/zabbix_agentd.conf

echo "192.168.8.133 Zabbix server" >> /etc/hosts

service zabbix-agent start

Configure hosts for zabbix-server

vim /etc/hosts

Host containing server and all clients

Complete the configuration of monitoring items according to monitoring needs

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