en	# 6 Zabbix appliance
zh-cn	# 6. Zabbix Appliance

en	#### Overview Zabbix appliance provides a way to instantly deploy Zabbix server and frontend, instead of setting them up manually or reusing an existing server for Zabbix. The appliance is based on AlmaLinux 8 (x86\_64) and contains a pre-configured Zabbix server running on MySQL and frontend running on Nginx web server. ::: noteimportant This appliance is designed for evaluating Zabbix. Using it in serious production environments is discouraged. ::: Appliance images are available for [download](http://www.zabbix.com/download_appliance) in the following formats: - Installation CD/DVD (.iso) - VMware (.vmx) - see [notes](#vmware) - Open virtualization format (.ovf) - Microsoft Hyper-V (.vhd/.vhdx) - see [notes](#hyper-v) - KVM, Parallels, QEMU, USB stick, VirtualBox, Xen (.raw) - see [notes](#hddflash-image-raw) - KVM, QEMU (.qcow2) Zabbix installation CD/DVD boot menu: ![](../../assets/en/manual/installation_cd_boot_menu1.png){width="600"}
zh-cn	#### 概述 作为手动设置或复用现有 Zabbix 服务器的替代方案，用户可以[下载](http://www.zabbix.com/download_appliance) Zabbix appliance 或 Zabbix appliance 安装 CD 镜像。 Zabbix appliance 及 安装 CD 均是基于 AlmaLinux 8 (x86\_64)。 Zabbix appliance 安装 CD 可用于 Zabbix server (MySQL) 的即时部署。 ::: noteimportant 你可以使用 Appliance 来评估Zabbix。这个 Appliance 不适用于重要的生产用途。 :::

en	#### Quick start

en	##### Pre-requisites 1. Make sure the host machine has sufficient resources to meet the virtual machine's system requirements: - *RAM*: 4 GB - *Disk space*: at least 8 GB should be allocated for the virtual machine - *CPU*: 2 cores minimum 2. If not yet installed, install the virtualization software for booting the appliance image (for example, [VirtualBox](https://www.virtualbox.org)). 3. [Download](https://www.zabbix.com/download_appliance) the appliance in the format supported by your virtualization software. 4. Check network settings to ensure that DHCP is enabled on the host machine.

en	##### Installation 1. Boot the appliance virtual machine from the downloaded image. 2. Configure virtual machine network settings to allow access from a browser on the host machine. This can be achieved by enabling *Bridged mode*. 3. Log in to the virtual machine using default system [credentials](#system). 4. To retrieve the IP address, run the following command on the virtual machine: ``` ip addr show ``` 5. Open a browser on the host machine and point it to the IP address the appliance has received over DHCP. 6. Log in to Zabbix using default [credentials](#zabbix-frontend) and start monitoring.

en	#### Configuration This section describes frequently required default configuration settings along with available customization options.

en	##### Credentials ###### System - Username: root - Password: zabbix ###### Zabbix frontend - Username: Admin - Password: zabbix After logging in, you can change default password in the [user profile settings](/manual/web_interface/user_profile#user-profile) or [create new users](/manual/config/users_and_usergroups/user) and delete the default one. ###### Database Passwords for all database users are randomly generated during the installation process. The following users are defined for the database: *Root:* - Username: root - Password: the password is stored in the `/root/.my.cnf` file. It is not required to input a password under the root account. *Zabbix server:* - Username: zabbix_srv - Password: the password is stored in the `/etc/zabbix/zabbix\_server.conf` *Zabbix frontend:* - Username: zabbix_web - Password: the password is stored in the `/etc/zabbix/web/zabbix.conf.php` To change a database user password, modify it in MySQL and the corresponding configuration file.
zh-cn	##### - 凭证信息 (用户名:密码) 系统： - root:zabbix Zabbix 前端： - Admin:zabbix 数据库： - root:<随机密码> - zabbix:<随机密码> ::: noteclassic 数据库密码是在安装过程中随机生成的。\ Root 密码存储在 /root/.my.cnf 文件中。不需要在 "root" 用户下输入密码。 ::: 要更改数据库用户密码，必须在以下位置同时改变配置： - MySQL; - /etc/zabbix/zabbix\_server.conf; - /etc/zabbix/web/zabbix.conf.php. ::: noteclassic 分别为 Zabbix Server 和 Zabbix 前端 定义了单独的用户 `zabbix_srv` 及 `zabbix_web`。 :::

en	##### Frontend access Zabbix frontend can be accessed at *http://<virtual machine's IP>*. By default, access is allowed from anywhere. To limit the access, modify `/etc/nginx/conf.d/zabbix.conf`. After saving the edited file, restart Nginx by logging in via SSH as [root user](#system) and executing: ``` systemctl restart nginx ```
zh-cn	#### - 前端的访问 默认情况下，允许从任何位置访问前端。 前端可以从 *http://<host>* 进行访问。 可在 **/etc/nginx/conf.d/zabbix.conf** 中修改此设置。在修改此文件后必须重启 Nginx。为此，请使用 SSH 以 **root** 用户身份登录并执行： systemctl restart nginx

en	##### Static IP address By default, the appliance uses DHCP to obtain the IP address. To set a static IP address: - Log in as [root user](#system). - Run the following commands, replacing values with your custom IP addresses: ``` nmcli connection modify eth0 ipv4.addresses 192.168.1.10/24 # Appliance IP address/CIDR prefix nmcli connection modify eth0 ipv4.gateway 192.168.1.1 # Gateway IP address nmcli connection modify eth0 ipv4.dns 8.8.8.8 # DNS server IP address nmcli connection modify eth0 ipv4.method manual systemctl restart network ``` Alternatively, you can open the file `/etc/NetworkManager/system-connections/eth0.nmconnection` and add the following lines: ``` [ipv4] address1=192.168.1.10/24,192.168.1.1 dns=8.8.8.8 method=manual ``` After saving the edited file, run the command `systemctl restart network`.
zh-cn	##### - 使用静态 IP 地址 默认情况下，Appliance 使用 DHCP 来获取 IP 地址。如果要指定一个静态 IP 地址： - 使用 root 用户登录； - 打开 */etc/sysconfig/network-scripts/ifcfg-eth0* 文件； - 将 *BOOTPROTO=dhcp* 替换为 *BOOTPROTO=none* ； - 添加以下的行： - *IPADDR=<Appliance 的 IP 地址>* - *PREFIX=<CIDR 前缀>* - *GATEWAY=<网关 IP 地址>* - *DNS1=<DNS 服务器 IP 地址>* - 执行 **systemctl restart network** 命令。 如有需要可以咨询红帽官方[文档](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s1-networkscripts-interfaces)

en	##### Firewall configuration To manage firewall settings, the appliance uses iptables with predefined rules: - Open SSH port (22 TCP) - Open Zabbix agent (10050 TCP) and Zabbix trapper (10051 TCP) ports - Open HTTP (80 TCP) and HTTPS (443 TCP) ports - Open SNMP trap port (162 UDP) - Open outgoing connections to NTP port (123 UDP) - Limit ICMP packets to 5 packets per second - Drop all other incoming connections To open additional ports, modify `/etc/sysconfig/iptables` file and reload firewall rules: ``` systemctl reload iptables ```
zh-cn	##### - 防火墙配置 Appliance 使用 iptables 防火墙预定义了一些规则： - 开启了 SSH 端口 (22 TCP)； - 开启了 Zabbix agent (10050 TCP) 及 Zabbix trapper (10051 TCP) 端口； - 开启了 HTTP (80 TCP) 及 HTTPS (443 TCP) 端口； - 开启了 SNMP trap 端口 (162 UDP)； - 开启了 连接到 NTP 的端口 (53 UDP)； - ICMP 数据包限制为每秒 5 个； - 所有其他传入连接都将断开。

en	##### Repositories Zabbix appliance uses *zabbix-release* package from the Zabbix [repository](https://repo.zabbix.com/zabbix/7.4/release/alma/8/). Repositories are configured in `/etc/yum.repos.d/*` directory.
zh-cn	##### - 仓库 官方的 Zabbix [仓库](/manual/installation/install_from_packages/rhel) 已经被添加到 */etc/yum.repos.d*： [zabbix] name=Zabbix Official Repository - $basearch baseurl=http://repo.zabbix.com/zabbix/7.0/rhel/8/$basearch/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591

en	##### Time zone By default, the appliance uses UTC for the system clock. To change the time zone, copy the appropriate file from `/usr/share/zoneinfo` to `/etc/localtime`, for example: ``` cp /usr/share/zoneinfo/Europe/Riga /etc/localtime ``` :::noteclassic Zabbix [frontend time zone](/manual/web_interface/time_zone) is set separately and can be changed in the frontend settings. The default time zone for Zabbix frontend is Europe/Riga. :::
zh-cn	##### - 更改时区 应用默认使用 UTC 作为系统时钟。如需更改时区，那么从 */usr/share/zoneinfo* 中复制合适的文件到 */etc/localtime* 中，例如： cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

en	##### File locations - Configuration files are located in `/etc/zabbix` - Zabbix server, proxy, and agent log files are located in `/var/log/zabbix` - Zabbix frontend is located in `/usr/share/zabbix` - The home directory for *zabbix* user is `/var/lib/zabbix`
zh-cn	##### - 文件路径 - 配置文件位于 **/etc/zabbix**。 - Zabbix server， proxy 及 agent 的日志文件位于 **/var/log/zabbix**。 - Zabbix 前端位于 **/usr/share/zabbix**。 - **zabbix** 用户的 home 目录位于 **/var/lib/zabbix**。

en	##### System services Systemd services are available. To see the list of Zabbix services, run the following command on the virtual machine: ``` systemctl list-units zabbix* ```
zh-cn	#### - 系统服务 在 Systemd 中列举 Zabbix 相关的服务： systemctl list-units zabbix*

en	#### Image format-specific notes
zh-cn	#### - 特定镜像的说明

en	###### VMware The images in *vmdk* format are usable directly in VMware Player, Server, and Workstation products. For use in ESX, ESXi, and vSphere they must be converted using [VMware vCenter Converter](https://support.broadcom.com/group/ecx/productfiles?subFamily=VMware%20vCenter%20converter&displayGroup=Standard&release=6.6.0&os=&servicePk=203348&language=EN) (authentication required for download). If you use VMware vCenter Converter, you may encounter issues with the hybrid network adapter. In that case, you can try specifying the E1000 adapter during the conversion process. Alternatively, after the conversion is complete, you can delete the existing adapter and add an E1000 adapter.
zh-cn	##### - VMware *vmdk* 格式的镜像可直接在 VMware Player、 Server 和 Workstation 的产品中使用。要在 ESX,、ESXi 和 vSphere 中使用，它们必须使用 [VMware converter](http://www.vmware.com/products/converter/) 进行转换。 如果你使用 VMware converter，你可能会遇到混合网络适配器的问题。在这种情况下，你可以尝试在转换过程中指定 E1000 适配器，或者等转换结束后，删除现有的适配器并添加 E1000 适配器。

en	###### HDD/flash image (raw) To boot the image, run: ``` dd if=./zabbix_appliance_7.4.0.raw of=/dev/sdc bs=4k conv=fdatasync ``` Replace `/dev/sdc` with your Flash/HDD disk device path.
zh-cn	##### - 制作 HDD/flash 镜像（raw） dd if=./zabbix_appliance_7.0.0.raw of=/dev/sdc bs=4k conv=fdatasync 将 */dev/sdc* 替换为你的 Flash/HDD 磁盘设备。

en	###### Hyper-V If the appliance fails to start up in Hyper-V, try pressing **Ctrl+Alt+F2** to switch a TTY session.

en	#### Troubleshooting If you encounter the error message *Access denied for user 'replace_user'@'localhost' (using password: YES)* while trying to log in to the frontend, it may indicate that the installation is still in progress. ![](../../assets/en/manual/appliance_troubleshoot.png) If the error persists after waiting a few minutes, or if you observe any other unexpected behavior, it likely means that the installation process has not completed successfully. In this case, we recommend deleting the current appliance and redeploying it by following the same installation instructions. This step typically resolves the issue. Note that attempting to manually fix a broken installation is not recommended, as it may lead to further complications.