안녕하세요.
오늘은 Zabbix 7.2 설치해보겠습니다.
Ubuntu 24.04.01 LTS
Zabbix 7.2
Zabbix Version 7.2
Ubuntu
22.04
Server. Frontend, Agent
MySQL
Apache
를 선택하면 설치 방법이 아래 표시 됩니다.
아래 처럼 따라 하면 됩니다.
1. root 권환 획
sudo -s |
2. Install Zabbix repository
wget https://repo.zabbix.com/zabbix/7.2/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.2+ubuntu24.04_all.deb dpkg -i zabbix-release_latest_7.2+ubuntu24.04_all.deb apt update |
kevin@kevin-virtual-machine:~$ sudo -s [sudo] password for kevin: root@kevin-virtual-machine:/home/kevin# wget https://repo.zabbix.com/zabbix/7.2/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.2+ubuntu22.04_all.deb --2024-12-25 22:23:37-- https://repo.zabbix.com/zabbix/7.2/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.2+ubuntu22.04_all.deb Resolving repo.zabbix.com (repo.zabbix.com)... 178.128.6.101, 2604:a880:2:d0::2062:d001 Connecting to repo.zabbix.com (repo.zabbix.com)|178.128.6.101|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 7288 (7,1K) [application/octet-stream] Saving to: ‘zabbix-release_latest_7.2+ubuntu22.04_all.deb’ zabbix-release_latest_7.2+ubun 100%[===================================================>] 7,12K --.-KB/s in 0s 2024-12-25 22:23:38 (1,30 GB/s) - ‘zabbix-release_latest_7.2+ubuntu22.04_all.deb’ saved [7288/7288] root@kevin-virtual-machine:/home/kevin# dpkg -i zabbix-release_latest_7.2+ubuntu22.04_all.deb Selecting previously unselected package zabbix-release. (Reading database ... 166576 files and directories currently installed.) Preparing to unpack zabbix-release_latest_7.2+ubuntu22.04_all.deb ... Unpacking zabbix-release (1:7.2-1+ubuntu22.04) ... Setting up zabbix-release (1:7.2-1+ubuntu22.04) ... root@kevin-virtual-machine:/home/kevin# apt update Hit:1 http://id.archive.ubuntu.com/ubuntu jammy InRelease Get:2 http://id.archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB] Hit:3 http://id.archive.ubuntu.com/ubuntu jammy-backports InRelease Get:4 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB] Get:5 https://repo.zabbix.com/zabbix/7.2/release/ubuntu jammy InRelease [2.424 B] Get:6 https://repo.zabbix.com/zabbix-tools/debian-ubuntu jammy InRelease [2.476 B] Get:7https://repo.zabbix.com/zabbix/7.2/stable/ubuntu jammy InRelease [3.920 B] Get:8 https://repo.zabbix.com/zabbix/7.2/release/ubuntu jammy/main Sources [521 B] Get:9 https://repo.zabbix.com/zabbix/7.2/release/ubuntu jammy/main all Packages [391 B] Get:10 https://repo.zabbix.com/zabbix-tools/debian-ubuntu jammy/main Sources [1.166 B] Get:11 https://repo.zabbix.com/zabbix-tools/debian-ubuntu jammy/main all Packages [766 B] Get:12 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages [576 kB] Get:13 https://repo.zabbix.com/zabbix/7.2/stable/ubuntu jammy/main Sources [4.173 B] Get:14 https://repo.zabbix.com/zabbix/7.2/stable/ubuntu jammy/main amd64 Packages [7.770 B] Get:15 https://repo.zabbix.com/zabbix/7.2/stable/ubuntu jammy/main all Packages [1.983 B] Get:16 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [2.006 kB] Get:17 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [317 kB] Get:18 http://security.ubuntu.com/ubuntu jammy-security/main amd64 DEP-11 Metadata [43,1 kB] Get:19 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [13,3 kB] Get:20 http://security.ubuntu.com/ubuntu jammy-security/restricted i386 Packages [38,2 kB] Get:21 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [2.711 kB] Get:22 http://security.ubuntu.com/ubuntu jammy-security/restricted Translation-en [472 kB] Get:23 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 DEP-11 Metadata [208 B] Get:24 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 c-n-f Metadata [580 B] Get:25 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [958 kB] Get:26 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages [648 kB] Get:27 http://security.ubuntu.com/ubuntu jammy-security/universe Translation-en [204 kB] Get:28 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 DEP-11 Metadata [126 kB] Get:29 http://security.ubuntu.com/ubuntu jammy-security/universe DEP-11 48x48 Icons [82,0 kB] Get:30 http://security.ubuntu.com/ubuntu jammy-security/universe DEP-11 64x64 Icons [122 kB] Get:31 http://security.ubuntu.com/ubuntu jammy-security/universe DEP-11 64x64@2 Icons [29 B] Get:32 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [19,5 kB] Get:33 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [37,6 kB] Get:34 http://security.ubuntu.com/ubuntu jammy-security/multiverse i386 Packages [1.356 B] Get:35 http://security.ubuntu.com/ubuntu jammy-security/multiverse Translation-en [8.260 B] Get:36 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 DEP-11 Metadata [208 B] Get:37 http://security.ubuntu.com/ubuntu jammy-security/multiverse DEP-11 48x48 Icons [29 B] Get:38 http://security.ubuntu.com/ubuntu jammy-security/multiverse DEP-11 64x64 Icons [29 B] Get:39 http://security.ubuntu.com/ubuntu jammy-security/multiverse DEP-11 64x64@2 Icons [29 B] Get:40 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 c-n-f Metadata [224 B] Fetched 8.667 kB in 9s (980 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done 3 packages can be upgraded. Run 'apt list --upgradable' to see them. N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository ' https://repo.zabbix.com/zabbix/7.2/stable/ubuntu jammy InRelease' doesn't support architecture 'i386' |
3. Zabbix 7.2 install
apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent |
root@kevin-VMware-Virtual-Platform:/home/kevin# apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: apache2 apache2-bin apache2-data apache2-utils fonts-dejavu fonts-dejavu-extra fping libapache2-mod-php libapache2-mod-php8.3 libapr1t64 libaprutil1-dbd-sqlite3 libaprutil1-ldap libaprutil1t64 libevent-core-2.1-7t64 libevent-extra-2.1-7t64 libevent-pthreads-2.1-7t64 libmodbus5 libmysqlclient21 libodbc2 libopenipmi0t64 mysql-client mysql-client-8.0 mysql-client-core-8.0 mysql-common php-bcmath php-common php-curl php-gd php-ldap php-mbstring php-mysql php-xml php8.3-bcmath php8.3-cli php8.3-common php8.3-curl php8.3-gd php8.3-ldap php8.3-mbstring php8.3-mysql php8.3-opcache php8.3-readline php8.3-xml snmpd Suggested packages: apache2-doc apache2-suexec-pristine | apache2-suexec-custom php-pear odbc-postgresql tdsodbc snmptrapd zabbix-nginx-conf virtual-mysql-server The following NEW packages will be installed: apache2 apache2-bin apache2-data apache2-utils fonts-dejavu fonts-dejavu-extra fping libapache2-mod-php libapache2-mod-php8.3 libapr1t64 libaprutil1-dbd-sqlite3 libaprutil1-ldap libaprutil1t64 libevent-core-2.1-7t64 libevent-extra-2.1-7t64 libevent-pthreads-2.1-7t64 libmodbus5 libmysqlclient21 libodbc2 libopenipmi0t64 mysql-client mysql-client-8.0 mysql-client-core-8.0 mysql-common php-bcmath php-common php-curl php-gd php-ldap php-mbstring php-mysql php-xml php8.3-bcmath php8.3-cli php8.3-common php8.3-curl php8.3-gd php8.3-ldap php8.3-mbstring php8.3-mysql php8.3-opcache php8.3-readline php8.3-xml snmpd zabbix-agent zabbix-apache-conf zabbix-frontend-php zabbix-server-mysql zabbix-sql-scripts 0 upgraded, 49 newly installed, 0 to remove and 7 not upgraded. Need to get 32.9 MB of archives. After this operation, 208 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libapr1t64 amd64 1.7.2-3.1ubuntu0.1 [108 kB] Get:2 http://archive.ubuntu.com/ubuntu noble/main amd64 libaprutil1t64 amd64 1.6.3-1.1ubuntu7 [91.9 kB] Get:3 https://repo.zabbix.com/zabbix/7.2/stable/ubuntu noble/main amd64 zabbix-server-mysql amd64 1:7.2.1-1+ubuntu24.04 [1,754 kB] Get:4 http://archive.ubuntu.com/ubuntu noble/main amd64 libaprutil1-dbd-sqlite3 amd64 1.6.3-1.1ubuntu7 [11.2 kB] Get:5 http://archive.ubuntu.com/ubuntu noble/main amd64 libaprutil1-ldap amd64 1.6.3-1.1ubuntu7 [9,116 B] Get:6 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 apache2-bin amd64 2.4.58-1ubuntu8.5 [1,329 kB] Get:7 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 apache2-data all 2.4.58-1ubuntu8.5 [163 kB] Get:8 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 apache2-utils amd64 2.4.58-1ubuntu8.5 [97.1 kB] Get:9 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 apache2 amd64 2.4.58-1ubuntu8.5 [90.2 kB] Get:10 http://archive.ubuntu.com/ubuntu noble/main amd64 snmpd amd64 5.9.4+dfsg-1.1ubuntu3 [59.6 kB] Get:11 http://archive.ubuntu.com/ubuntu noble/main amd64 libevent-core-2.1-7t64 amd64 2.1.12-stable-9ubuntu2 [91.3 kB] Get:12 http://archive.ubuntu.com/ubuntu noble/main amd64 libevent-extra-2.1-7t64 amd64 2.1.12-stable-9ubuntu2 [64.2 kB] Get:13 http://archive.ubuntu.com/ubuntu noble/main amd64 libevent-pthreads-2.1-7t64 amd64 2.1.12-stable-9ubuntu2 [7,982 B] Get:14 http://archive.ubuntu.com/ubuntu noble/main amd64 mysql-common all 5.8+1.1.0build1 [6,746 B] Get:15 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libmysqlclient21 amd64 8.0.40-0ubuntu0.24.04.1 [1,254 kB] 13% [15 libmysqlclient21 944 kB/1,254 kB 75%] [3 zabbix-server-mysql 98.0 kB/1,754 kB 6%] |
4. mysql를 설치 합니다
apt-get install mysql-server |
5. mysql를 시작하고 재부팅 되어도 자동으로 실행 되게 설정합니다.
systemctl start mysql systemctl enable mysql |
6. initial database
mysql -uroot -p default password 없음 mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin; mysql> create user zabbix@localhost identified by 'Password123!@#'; ->password는 zabbix user password를 입력 합니다. mysql> grant all privileges on zabbix.* to zabbix@localhost; mysql> set global log_bin_trust_function_creators = 1; mysql> quit; |
root@kevin-VMware-Virtual-Platform:/home/kevin# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.40-0ubuntu0.24.04.1 (Ubuntu) Copyright (c) 2000, 2024, Oracle and/or its affiliates. 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 utf8mb4 collate utf8mb4_bin; Query OK, 1 row affected (0.01 sec) mysql> create user zabbix@localhost identified by 'Password123!@#'; Query OK, 0 rows affected (0.03 sec) mysql> grant all privileges on zabbix.* to zabbix@localhost; Query OK, 0 rows affected (0.01 sec) mysql> set global log_bin_trust_function_creators = 1; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> quit; Bye root@kevin-VMware-Virtual-Platform:/home/kevin# |
7. On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix |
약 3분정도가 소요됩니다. 다른 키보드를 누르지 말고 기다립니다.
root@kevin-VMware-Virtual-Platform:/home/kevin# zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix Enter password: root@kevin-VMware-Virtual-Platform:/home/kevin# |
8. Disable log_bin_trust_function_creators option after importing database schema.
# mysql -uroot -p password mysql> set global log_bin_trust_function_creators = 0; mysql> quit; |
9. Configure the database for Zabbix server
vim /etc/zabbix/zabbix_server.conf |
vim이 실행되지 않으면 아래와 같이 설치 합니다.
apt-get install vim
DBPassword= password를 입력합니다. 아까 db 생설할때 password입니다.
그리고 저장 합니다.
10. Start Zabbix server and agent processes
systemctl restart zabbix-server zabbix-agent apache2 systemctl enable zabbix-server zabbix-agent apache2 |
11. http://host/zabbix 입력합니다
디폴트 Username/Password
Admin/zabbix
지금까지 [ZABBIX][#4]-Zabbix 7.2 Install 글을 읽어주셔서 감사합니다.
'NMS Tools > ZABBIX' 카테고리의 다른 글
[ZABBIX][#3]-Ubuntu 24.04.01 update/upgrade (0) | 2024.12.25 |
---|---|
[ZABBIX][#2]-Ubuntu 24.04.01 ssh install (0) | 2024.12.25 |
[ZABBIX][#1]-Ubuntu 24.04.01 LTS Install (0) | 2024.12.25 |