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
sudo yum -y update
sudo sed -i "s/SELINUX=enforcing/SELINUX=disabled/g"/etc/selinux/config
sudo systemctl stop firewalld.service && systemctl disable firewalld.service
Complete steps 3 and 4 and restart it.
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
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
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
sudo systemctl enable mysqld && systemctl start mysqld
grep 'temporary password'/var/log/mysqld.log
JtZizq!Rl6E+
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,.
sudo systemctl restart mysqld
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;
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/
sudo yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-java-gateway zabbix-web
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)
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)
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
systemctl stop mysqld && reboot
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.
Then select Administrator -> Users -> Admin
( adsbygoogle = window.adsbygoogle || []).push({});
Recommended Posts