wiki:Nmm2022/Agenda/Netbox

Version 3 (modified by geethike, 2 years ago) ( diff )

--

Installing NetBox on Ubuntu 20.04

NetBox requires PostgreSQL 10 or later. Please note that MySQL and other relational databases are not supported.

PostgreSQL Database Installation

# sudo apt update
# sudo apt install -y postgresql

Once PostgreSQL has been installed, start the service and enable it to run at boot:

# sudo systemctl start postgresql
# sudo systemctl enable postgresql

Database Creation

At a minimum, we need to create a database for NetBox and assign it a username and password for authentication. Start by invoking the PostgreSQL shell as the system Postgres user.

# sudo -u postgres psql

Within the shell, enter the following commands to create the database and user (role), substituting your own value for the password:

CREATE DATABASE netbox;
CREATE USER netbox WITH PASSWORD 'netbox123';
GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;

Do not use the password from the example. Choose a strong, random password to ensure secure database authentication for your NetBox installation.

Once complete, enter \q to exit the PostgreSQL shell.

Redis Installation

Redis is an in-memory key-value store which NetBox employs for caching and queuing. This section entails the installation and configuration of a local Redis instance. Redis v4.0 or later required.

# sudo apt install -y redis-server

Before continuing, verify that your installed version of Redis is at least v4.0:

# redis-server -v

You may wish to modify the Redis configuration at /etc/redis.conf or /etc/redis/redis.conf , however in most cases the default configuration is sufficient.

# sudo systemctl start redis-server.service

Verify Service Status

Use the redis-cli utility to ensure the Redis service is functional:

# redis-cli ping

If successful, you should receive a PONG response from the server.

Attachments (1)

Note: See TracWiki for help on using the wiki.