zabbix_7.4_sur_debian_12_avec_ssl
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
zabbix_7.4_sur_debian_12_avec_ssl [2025/07/07 15:23] – created 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 (Vanilla Setup) ===== | ||
- | |||
- | ==== 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` | ||
- | * Recommended to carefully read each prompt and avoid default answers where security is impacted. | ||
- | |||
- | ==== 4. Add Zabbix Repository ==== | ||
- | * Download and install official Zabbix APT package: | ||
- | `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` | ||
- | ``` | ||
- | 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: | ||
- | `http:// | ||
- | |||
- | ===== SSL Setup ===== | ||
- | |||
- | ==== 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 / | ||
- | Add or update: | ||
- | ``` | ||
- | SSLEngine on | ||
- | SSLCertificateFile / | ||
- | SSLCertificateKeyFile / | ||
- | DocumentRoot / | ||
- | ``` | ||
- | |||
- | ==== 3. Force HTTP to Redirect to HTTPS ==== | ||
- | * Edit HTTP virtual host: | ||
- | `sudo nano / | ||
- | Inside `< | ||
- | ``` | ||
- | Redirect "/" | ||
- | ``` | ||
- | Replace '' | ||
- | |||
- | ==== 4. Apply Changes ==== | ||
- | * Restart Apache: | ||
- | `sudo systemctl restart apache2` | ||
- | |||
- | ==== 5. Access the Frontend ==== | ||
- | * Use: | ||
- | `https:// | ||
- | Accept browser warning for the self-signed cert. | ||
zabbix_7.4_sur_debian_12_avec_ssl.1751926986.txt.gz · Last modified: by Fabián Rodríguez