===== Cacti 0.8.8h + Weathermap 0.98 ===== ==== Wstęp ==== Instalujemy Debiana w wersji 8 (chodzi o obsługę PHP 5.x) - wersję minimum z SSH. Doinstalowujemy pakiety: aptitude install nginx php5-fpm php5-mysql php5-gd mysql-server mysql-client bzip2 unzip p7zip-full mc libphp-adodb php5-cli php5-snmp rrdtool snmp ucf iputils-ping ==== Nginx ==== Edytujemy plik: /etc/nginx/sites-enabled/default i ustawiamy w nim: server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.php; server_name _; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php5-fpm.sock; } } Reload konfiguracji: /etc/init.d/nginx reload ==== MySQL ==== root@cacti:~# mysql -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 86 Server version: 5.5.62-0+deb8u1 (Debian) 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 USER 'cacti'@'localhost' IDENTIFIED BY 'cacti4321'; Query OK, 0 rows affected (0.00 sec) mysql> CREATE DATABASE cacti; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON cacti.* TO cacti@'localhost'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> \q Bye ==== Aplikacja ==== cd /var/www/ wget https://github.com/howardjones/network-weathermap/releases/download/version-0.98/php-weathermap-0.98.zip wget https://www.cacti.net/downloads/cacti-0.8.8h.tar.gz unzip ./php-weathermap-0.98.zip tar xzf ./cacti-0.8.8h.tar.gz mv ./cacti-0.8.8h/* ./html rm ./cacti-0.8.8h mv ./weathermap ./html/plugins/ rm cacti-0.8.8h.tar.gz rm php-weathermap-0.98.zip cd html mysql -u cacti -p cacti < ./cacti.sql Edytujemy plik /var/www/html/include/config.php. Przechodzimy do strony http://naszeip/ ==== Gotowy obraz VM ==== Informacje: Obraz został stworzony pod kontrolą Proxmoxa w formacie qcow2 - po rozpakowaniu będzie zajmował 32GB! Debian 8 x64 DHCP Client jest włączony SSH: devel/pld root/pld MySQL: root/pld cacti/cacti4321 Cacti: http://ip/ admin/admin0987654321 Link do pobrania: [[http://tt.orchia.pl/vm_qcow2_debian8x64_cacti0.8.8h_weathermap0.98.7z]] (538MB)