Changes between Version 6 and Version 7 of Nmm2022/Agenda/Netbox


Ignore:
Timestamp:
Jun 1, 2022, 4:27:36 PM (2 years ago)
Author:
geethike
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Nmm2022/Agenda/Netbox

    v6 v7  
    111111# sudo chown --recursive netbox /opt/netbox/netbox/media/
    112112}}}
     113
     114=== Configuration ===
     115Move into the NetBox configuration directory and make a copy of ''' configuration_example.py ''' named ''' configuration.py.''' This file will hold all of your local configuration parameters.
     116{{{
     117# cd /opt/netbox/netbox/netbox/
     118# sudo cp configuration_example.py configuration.py
     119}}}
     120Open ''' configuration.py ''' with your preferred editor to begin configuring NetBox. NetBox offers many configuration parameters, but only the following four are required for new installations:
     121* ALLOWED_HOSTS
     122* DATABASE
     123* REDIS
     124* SECRET_KEY
     125
     126=== ALLOWED_HOSTS ===
     127This is a list of the valid hostnames and IP addresses by which this server can be reached. You must specify at least one name or IP address. (Note that this does not restrict the locations from which NetBox may be accessed: It is merely for HTTP host header validation.)
     128
     129{{{
     130# vim configuration.py
     131
     132ALLOWED_HOSTS = ['netbox.example.com', '192.0.2.123']
     133}}}
     134If you are not yet sure what the domain name and/or IP address of the NetBox installation will be, you can set this to a wildcard (asterisk) to allow all host values:
     135{{{
     136ALLOWED_HOSTS = ['*']
     137}}}
     138
     139=== DATABASE ===
     140This parameter holds the database configuration details. You must define the username and password used when you configured PostgreSQL. If the service is running on a remote host, update the '''HOST and PORT ''' parameters accordingly. See the configuration documentation for more detail on individual parameters.
     141{{{
     142DATABASE = {
     143    'NAME': 'netbox',               # Database name
     144    'USER': 'netbox',               # PostgreSQL username
     145    'PASSWORD': 'netbox123',        # PostgreSQL password
     146    'HOST': 'localhost',            # Database server
     147    'PORT': '',                     # Database port (leave blank for default)
     148    'CONN_MAX_AGE': 300,            # Max database connection age (seconds)
     149}
     150}}}
     151