zabbix_7.4_sur_debian_12_avec_ssl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
zabbix_7.4_sur_debian_12_avec_ssl [2025/07/08 05:52] – [Zabbix 7.4 Installation on Debian 12] Fabián Rodríguez | zabbix_7.4_sur_debian_12_avec_ssl [2025/07/08 05:57] (current) – removed Fabián Rodríguez | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Zabbix 7.4 Installation on Debian 12 ===== | ||
- | |||
- | These instructions make the assumption : | ||
- | |||
- | * You have a Debian 12 " | ||
- | * No root account, all commands are run as '' | ||
- | * Zabbix server is NOT Internet-facing, | ||
- | |||
- | For an Internet-facing install, consider setting up an SSL certificate with certbot, and configuring two-factor authentication (2FA). | ||
- | |||
- | [[https:// | ||
- | |||
- | == Credits == | ||
- | * Fabian Rodríguez, François Baillargeon (review) - [[https:// | ||
- | ==== 1. Configure Locales ==== | ||
- | Set up '' | ||
- | < | ||
- | dpkg-reconfigure locales | ||
- | </ | ||
- | |||
- | ==== 2. Install MariaDB (Zabbix Database Backend) ==== | ||
- | Install the default MariaDB server package: | ||
- | < | ||
- | apt install default-mysql-server | ||
- | </ | ||
- | |||
- | ==== 3. Secure MariaDB Setup ==== | ||
- | Run as '' | ||
- | < | ||
- | mariadb-secure-installation | ||
- | </ | ||
- | |||
- | Answer ' | ||
- | |||
- | ==== 4. Add Zabbix Repository ==== | ||
- | Download and install official Zabbix APT package - whis will add Zabbix repositories to your servers', | ||
- | < | ||
- | wget https:// | ||
- | dpkg -i zabbix-release_latest_7.4+debian12_all.deb | ||
- | apt update | ||
- | </ | ||
- | |||
- | ==== 5. Install Zabbix Components ==== | ||
- | Install server, frontend (PHP), Apache configuration, | ||
- | < | ||
- | apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent | ||
- | </ | ||
- | |||
- | ==== 6. Create Zabbix Database and Import Schema ==== | ||
- | Connect to MariaDB and create database/ | ||
- | < | ||
- | mysql -uroot -p | ||
- | </ | ||
- | (press enter as your '' | ||
- | |||
- | **Important** : The second statement should be changed to use a password of your choice. | ||
- | |||
- | < | ||
- | create database zabbix character set utf8mb4 collate utf8mb4_bin; | ||
- | create user zabbix@localhost identified by ' | ||
- | grant all privileges on zabbix.* to zabbix@localhost; | ||
- | set global log_bin_trust_function_creators = 1; | ||
- | quit; | ||
- | </ | ||
- | |||
- | Import initial schema: | ||
- | < | ||
- | zcat / | ||
- | </ | ||
- | |||
- | Disable trust function flag after import: | ||
- | < | ||
- | mysql -uroot -p | ||
- | </ | ||
- | < | ||
- | set global log_bin_trust_function_creators = 0; | ||
- | quit; | ||
- | </ | ||
- | |||
- | ==== 7. Configure Zabbix Server ==== | ||
- | Set the database password in ''/ | ||
- | < | ||
- | DBPassword=password | ||
- | </ | ||
- | |||
- | ==== 8. Start and Enable Zabbix Services ==== | ||
- | Start and enable server, agent, and Apache: | ||
- | < | ||
- | systemctl restart zabbix-server zabbix-agent apache2 | ||
- | systemctl enable zabbix-server zabbix-agent apache2 | ||
- | </ | ||
- | |||
- | ==== 9. Access Zabbix Web UI ==== | ||
- | Open Zabbix frontend in a browser to test the installation has completed well (don't finish it just yet, SSL setup is next!): | ||
- | < | ||
- | http:// | ||
- | </ | ||
- | |||
- | ===== SSL Setup ===== | ||
- | |||
- | Using SSL in a LAN environment helps protect sensitive data like login credentials from being intercepted or tampered with—even on internal networks where threats can arise from compromised devices or curious users. | ||
- | |||
- | While self-signed certificates aren't trusted publicly, they' | ||
- | |||
- | ==== 1. Generate Self-Signed Certificate ==== | ||
- | Create directory: | ||
- | < | ||
- | sudo mkdir -p / | ||
- | </ | ||
- | |||
- | Generate cert: | ||
- | < | ||
- | sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout / | ||
- | </ | ||
- | |||
- | ==== 2. Configure Apache for SSL ==== | ||
- | Enable SSL module and default SSL site: | ||
- | < | ||
- | sudo a2enmod ssl | ||
- | sudo a2ensite default-ssl | ||
- | </ | ||
- | |||
- | Edit SSL virtual host: | ||
- | < | ||
- | sudo nano / | ||
- | </ | ||
- | Update config: | ||
- | < | ||
- | SSLEngine on | ||
- | SSLCertificateFile / | ||
- | SSLCertificateKeyFile / | ||
- | DocumentRoot / | ||
- | </ | ||
- | |||
- | ==== 3. Force HTTP to Redirect to HTTPS ==== | ||
- | This prevents accidentally using http (plain-text) to connect to your server. | ||
- | |||
- | Edit HTTP virtual host: | ||
- | < | ||
- | sudo nano / | ||
- | </ | ||
- | Add inside ''< | ||
- | < | ||
- | Redirect "/" | ||
- | </ | ||
- | Replace '' | ||
- | |||
- | ==== 4. Apply Changes ==== | ||
- | Restart Apache: | ||
- | < | ||
- | sudo systemctl restart apache2 | ||
- | </ | ||
- | |||
- | ==== 5. Access the Frontend ==== | ||
- | Use: | ||
- | < | ||
- | https:// | ||
- | </ | ||
- | Accept the browser warning for the self-signed certificate. | ||
- | |||
- | The default access credentials are : | ||
- | * User : **Admin** | ||
- | * Password : **zabbix** | ||
- | |||
zabbix_7.4_sur_debian_12_avec_ssl.1751979173.txt.gz · Last modified: by Fabián Rodríguez