Centos 7 install Zabbix 3.4 original

Zabbix 3.4 supports Centos 7. It does not seem to support 6.9.

For more details, please refer to the official documentation, the detailed installation requirements are not posted.

https://www.zabbix.com/documentation/3.4/zh/manual/installation/requirements

Virtual machine configuration dual-core 8G memory

01、 Minimize the installation of the operating system##

02、 Upgrade system components to the latest version##

sudo yum -y update

03、 Turn off SELinux

sudo sed -i "s/SELINUX=enforcing/SELINUX=disabled/g"/etc/selinux/config

04、 Turn off the firewall##

sudo systemctl stop firewalld.service && systemctl disable firewalld.service

Complete steps 3 and 4 and restart it.

05、 Get SQL source##

sudo rpm -Uvh https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

It can be downloaded from https://dev.mysql.com/downloads/file/?id=470281

06、 Install Zabbix required software support package##

Install mysql first

sudo yum install mysql-*--skip-broken Conflicting software skip

Install Apache

sudo yum -y install httpd

systemctl start httpd.service #start up

systemctl stop httpd.service #stop

systemctl restart httpd.service #Reboot

systemctl enable httpd.service #boot

systemctl disable httpd.service #Boot does not start

Install php

sudo yum install php

Install php extension

sudo yum install php-mysqlnd php-gd libjpeg* php-snmp php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-bcmath php-mhash php-common php-ctype php-xml php-xmlreader php-xmlwriter php-session php-mbstring php-gettext php-ldap php-mysqli --skip-broken

sudo yum install wget telnet net-tools python-paramiko gcc gcc-c++ dejavu-sans-fonts python-setuptools python-devel sendmail mailx net-snmp net-snmp-devel net-snmp-utils freetype-devel libpng-devel perl unbound libtasn1-devel p11-kit-devel OpenIPMI unixODBC

07、 Set MySQL parameters (8GB memory as an example)

sudo vim /etc/my.cnf or there is no permission to save

Add the following at the end of the file:

innodb_file_per_table =1
innodb_status_file =1
innodb_buffer_pool_size = 6G
innodb_flush_log_at_trx_commit =2
innodb_log_buffer_size = 16M
innodb_log_file_size = 64M
innodb_support_xa =0default-storage-engine = innodb
bulk_insert_buffer_size = 8M
join_buffer_size = 16M
max_heap_table_size = 32M
tmp_table_size = 32M
max_tmp_tables =48
read_buffer_size = 32M
read_rnd_buffer_size = 16M
key_buffer_size = 32M
thread_cache_size =32
innodb_thread_concurrency =8
innodb_flush_method = O_DIRECT
innodb_rollback_on_timeout =1
query_cache_size = 16M
query_cache_limit = 16M
collation_server = utf8_bin
character_set_server = utf8

Note: In principle, innodb_buffer_pool_size needs to be set to 80% of the host memory. If the host memory is not 8GB, the above parameters can be adjusted according to the corresponding ratio. For example, if the host memory is 16GB, innodb_buffer_pool_size is recommended to be set to 12GB, innodb_log_buffer_size is recommended to be set to 32M, innodb_log_file_size is recommended Set to 128M, and so on. Please note that the value of innodb_buffer_pool_size must be an integer. For example, if the host memory is 4G, then innodb_buffer_pool_size can be set to 3G, but not 3.2G

08、 Start MySQL

sudo systemctl enable mysqld && systemctl start mysqld

09、 Get the initial MySQL root password##

grep 'temporary password'/var/log/mysqld.log

JtZizq!Rl6E+

10、 Perform MySQL Security Configuration##

The initial password obtained on the 09th will be used at the beginning of the configuration. It is recommended to change it to a custom password, and select y for other options

mysql_secure_installation

Change the password to: Aa123456,.

11、 Restart MySQL

sudo systemctl restart mysqld

12、 Configure the library and account permissions required by zabbix in MySQL##

mysql -u root -p (need to enter the custom password set in step 10)

mysql>create database zabbix character set utf8; #Create database

mysql>create user zabbix@'%' identified by 'Qingdao@2017'; #Create user and password

mysql>grant all privileges on zabbix.* to zabbix@'%'; #Empower

mysql>flush privileges;

mysql>exit;

13、 Install Zabbix source##

sudo rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm

http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/

14、 Install zabbix

sudo yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-java-gateway zabbix-web

15、 Import zabbix required information##

cd /usr/share/doc/zabbix-server-mysql-3.4.3

zcat create.sql.gz | mysql -uroot zabbix -p (need to enter the custom password set in step 10)

16、 Configure zabbix parameters##

sudo vim /etc/zabbix/zabbix_server.conf this configuration needs to be repeated

Mainly the following options and parameters need to be set (8GB memory as an example):

DBPassword is configured as the custom password set in step 12, line 3

CacheSize=512M

(CacheSize is on line 371)

HistoryCacheSize=128M

(HistoryCacheSize is on line 397)

HistoryIndexCacheSize=128M

(HistoryIndexCacheSize is on line 405)

TrendCacheSize=128M

(TrendCacheSize is on line 414)

ValueCacheSize=256M

(ValueCacheSize is on line 425)

Timeout=30

(Timeout at 432

Keep other parameters as default

If you need to monitor VMware virtual machines, you also need to set the following option parameters:

StartVMwareCollectors=2

(StartVMwareCollectors on line 272

VMwareCacheSize=256M

(VMwareCacheSize is on line 298)

VMwareTimeout=300

(VMwareTimeout is on line 306)

17、 Configure PHP parameters in Apache (8GB RAM as an example)

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

php_value max_execution_time 600

php_value memory_limit 256M

php_value post_max_size 32M

php_value upload_max_filesize 32M

php_value max_input_time 600

php_value always_populate_raw_post_data -1

date.timezone remove the comment symbol#And modify the value to Asia/Shanghai

18、 Restart the system##

systemctl stop mysqld && reboot

19、 Start zbx

sudo systemctl start httpd && systemctl start zabbix-server

20、 Enter http://zbx monitoring server's IP address/zabbix in the browser to perform the initial configuration of the zabbix page

The PHP settings on this page require all OK

If the password is entered incorrectly, you will not be able to jump to the next step. The password is the Qingdao@2017 set earlier

Note: In the "Zabbix server detail" page of step 4, the "Name" field can be filled with descriptive text for this monitoring system, which supports Chinese, which is a bit like the name of the website.

21、 Log in to the zbx monitoring system for the first time. The default user name is admin and the default password is zabbix. Confirm that you can log in to the system normally.

22、 After logging into the system, confirm that the value of Zabbix server is running is Yes.

Then select Administrator -> Users -> Admin

23、 Go back to "Monitoring" -> "Dashboard", you can see that the monitoring system has been set to the Chinese interface.

( adsbygoogle = window.adsbygoogle || []).push({});

Recommended Posts

Centos 7 install Zabbix 3.4 original
CentOS 7.4 install Zabbix 3.4
CentOS 7.3 install Zabbix3
centos 6.5 install zabbix 4.4
Centos7 install docker-18.x original
CentOS 8 install ZABBIX4.4 guide
Centos7 install pyenv original
CentOS 7 install Redis 5.0.8 original
1.5 Install Centos7
Install Zabbix 3.4 based on CentOS 7
CENTOS7 manually install CEPH original
CentOS 8.0.1905 install ZABBIX4.4 version (verified)
Centos6 install Python2.7.13
Centos7.3 install nginx
CentOS install Redmine
Centos7 install Python 3.6.
CentOS7 install MySQL
Centos7 install protobuf
CentOS7 install GlusterFS
Centos6.5 install Tomcat
CentOS install Python 3.6
Vmware install CentOS6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS 7 install Hadoop 3.0.0
Centos7 install Python2.7
Centos 7.6 install seleniu
Centos7 install LAMP+PHPmyadmin
CentOS install mysql
CentOS install openjdk 1.8
CENTOS6.5 install CDH5.12.1 (1)
CentOS install PHP
CentOS6 install mist.io
Centos7 install Docker
CentOS7 install mysql
centOs install rabbitMQ
CentOS 7 install MySQL 5.6
Centos7 install Nginx
Centos7 install docker18
Centos install Python3
centos7 install docker
CentOS install jdk
centos7 install nginx-rtmp
CentOS8 install MySQL8.0
Centos6.3 install KVM
CentOS7 install mysql8
CentOS 7 install Java 1.8
CentOS8 install fastdfs6.06
CentOS 7 install Gitlab
Centos 7 install PostgreSQL
CentOS7 install MySQL8
CentOS 6 install Docker
Centos8 install Docker
CentOS6.8 install python2.7
CentOS install nodejs 8
CentOS6.5 install GNS3
centos 7.5 install mysql5.7.17
Centos7 install MySQL8.0-manual
CentOS7 install Kubernetes 1.16.3
centos7 install lamp
Install centos7 and connect