NETBOX — различия между версиями

Материал из megapuper
Перейти к: навигация, поиск
Строка 2: Строка 2:
  
 
PostgreSQL database<br>
 
PostgreSQL database<br>
 +
 +
Ставим PostgreSQL в данном случае версия 17
 +
apt install -y postgresql
 +
sudo -u postgres psql
 +
 +
Создаём базу и пользователя
 +
CREATE DATABASE netbox;
 +
CREATE USER netbox WITH PASSWORD 'пароль';
 +
ALTER DATABASE netbox OWNER TO netbox;
 +
-- the next two commands are needed on PostgreSQL 15 and later
 +
\connect netbox;
 +
GRANT CREATE ON SCHEMA public TO netbox;
 +
 +
Проверяем подключение
 +
root@netbox ~ # psql --username netbox --password --host localhost netbox
 +
Password:
 +
psql (17.8 (Debian 17.8-1.pgdg13+1))
 +
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off, ALPN: postgresql)
 +
Type "help" for help.
 +
 +
netbox=> \conninfo
 +
You are connected to database "netbox" as user "netbox" on host "localhost" (address "127.0.0.1") at port "5432".
 +
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off, ALPN: postgresql)
 +
 +
 
Redis<br>
 
Redis<br>
 
NetBox components<br>
 
NetBox components<br>

Версия 02:01, 21 февраля 2026

The following sections detail how to set up a new instance of NetBox:

PostgreSQL database

Ставим PostgreSQL в данном случае версия 17

apt install -y postgresql
sudo -u postgres psql

Создаём базу и пользователя

CREATE DATABASE netbox;
CREATE USER netbox WITH PASSWORD 'пароль';
ALTER DATABASE netbox OWNER TO netbox;
-- the next two commands are needed on PostgreSQL 15 and later
\connect netbox;
GRANT CREATE ON SCHEMA public TO netbox;

Проверяем подключение

root@netbox ~ # psql --username netbox --password --host localhost netbox
Password: 
psql (17.8 (Debian 17.8-1.pgdg13+1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off, ALPN: postgresql)
Type "help" for help.

netbox=> \conninfo
You are connected to database "netbox" as user "netbox" on host "localhost" (address "127.0.0.1") at port "5432".
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off, ALPN: postgresql)


Redis
NetBox components
uWSGI
HTTP server
LDAP authentication (optional)










https://nixhub.ru/posts/netbox-install/
https://netboxlabs.com/docs/netbox/installation/