Skip to content

Latest commit

 

History

History

2023_11_proxmox_maria

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Subscribe

Ресурсы:

Proxmox VE Helper Scripts - github

Команды и ссылки из урока:

☑️ Панель Система в configuration.yaml

panel_custom:
  - name: server_state
    sidebar_title: 'System'
    sidebar_icon: mdi:server
    js_url: /api/hassio/app/entrypoint.js
    url_path: 'hassio/system'
    embed_iframe: true
    require_admin: true
    config:
      ingress: core_configurator

☑️ Активация пакаджей configuration.yaml

homeassistant:
  packages: !include_dir_merge_named includes/packages

☑️ Сенсоры в system_sensors.yaml

    sensor:    
    - platform: systemmonitor
      resources:
      - type: processor_use
      - type: disk_use_percent
        arg: /
      - type: memory_use_percent
      - type: last_boot
      - type: disk_free
        arg: /
      - type: processor_temperature

☑️ Скрипт безопасности -

mysql_secure_installation

Enter current password for root (enter for none): enter
Switch to unix_socket authentication [Y/n] y
Change the root password? [Y/n] n
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

☑️ Настройка БД -

mysql

☑️ Создание пользователя - dbadmin пароль dbpassword (меняем на свои) -

CREATE USER 'dbadmin'@'localhost' IDENTIFIED BY 'dbpassword';

☑️ Даем пользователю права администратора -

GRANT ALL ON *.* TO 'dbadmin'@'localhost' IDENTIFIED BY 'dbpassword' WITH GRANT OPTION;

☑️ Предоставление доступа из локальной сети -

GRANT ALL ON *.* TO 'dbadmin'@'192.168.0.%' IDENTIFIED BY 'dbpassword' WITH GRANT OPTION;

☑️ Очистка привилегий -

FLUSH PRIVILEGES;

☑️ Выход -

exit

☑️ Вход под созданным пользователем -

mysql -u dbadmin -p

☑️ Вход под созданным пользователем (для новых релизов)-

/usr/bin/mariadb -u dbadmin -p

☑️ Создание базы для Home Assistant

CREATE DATABASE homeassistant;

☑️ Выход -

exit

☑️ Путь к базе в файле secrets.yaml

db_link: mysql://dbadmin:dbpassword@192.168.0.41:3306/homeassistant?charset=utf8

☑️ Рекордер в system_sensors.yaml

    recorder:
      db_url: !secret db_link
      purge_keep_days: 14

☑️ Интеграция SQL
Name:

MariaDB

Database URL:

mysql://dbadmin:dbpassword@192.168.0.41:3306/homeassistant?charset=utf8

Column:

value

Select Query:

SELECT table_schema "database", Round(Sum(data_length + index_length) / 1048576, 2) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema;

Unit of Measure:

MB

To financially support the project Smart Home with Alex Kvazis

Youtube Sponsorship Patreon Support Buy Me A Coffee PayPal Me

Or a donation of any amount -

  • Webmoney - Z243592584952
  • USDT TRON (TRC20) - TUvBLFpVAFiR7Z64MEjkXvZcdf1DGDEYTu
  • BTC - bc1qpqma0ndrmxw70y28esdaghu2pl8ttf97nh0ghc
  • ETH - 0xD4D06B1B1a6879ce4B36922F6ad96ddf30FD7E1A
  • TON - UQBEShkfKCFhvqlTs_oIpa6kFIQJguJR30hDXany1cCAbCfe