[root@zml ~]# yum -y install net-snmp-devel libevent-devel
[root@zml ~]# cd /usr/src/
[root@zml src]# tar -xf zabbix-4.0.3.tar.gz
[root@zml src]# groupadd -r zabbix
[root@zml src]# useradd -r -M -s /sbin/nologin -g zabbix zabbix
[root@zml src]# mysql -uroot -pzml123!
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.23 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.24 sec)
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix123!';
Query OK, 0 rows affected, 2 warnings (0.21 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.25 sec)
mysql> exit
Bye
[root@zml src]# cd zabbix-4.0.4/database/mysql/
[root@zml mysql]# ls
data.sql images.sql Makefile.am Makefile.in schema.sql
[root@zml mysql]# mysql -uzabbix -pzabbix123! zabbix < schema.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
[root@zml mysql]# mysql -uzabbix -pzabbix123! zabbix < images.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
[root@zml mysql]# mysql -uzabbix -pzabbix123! zabbix < data.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
[root@zml mysql]# cd ../..
[root@zml zabbix-4.0.3]# ./configure --enable-server \
> --enable-agent \
> --with-mysql \
> --with-net-snmp \
> --with-libcurl \
> --with-libxml2
[root@zml zabbix-4.0.3]# make install
[root@zml zabbix-4.0.3]# ls /usr/local/etc/
zabbix_agentd.conf zabbix_agentd.conf.d zabbix_server.conf zabbix_server.conf.d
[root@zml zabbix-4.0.3]# vim /usr/local/etc/zabbix_server.conf
#
# Mandatory: no
# Default:
DBPassword=zabbix123!
### Option: DBSocket
[root@zml zabbix-4.0.3]# zabbix_server
[root@zml zabbix-4.0.3]# zabbix_agentd
[root@zml zabbix-4.0.3]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 128 *:22 *:*
LISTEN 0 100 127.0.0.1:25 *:*
LISTEN 0 128 *:10050 *:*
LISTEN 0 128 *:10051 *:*
LISTEN 0 128 127.0.0.1:9000 *:*
LISTEN 0 128 :::80 :::*