You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At a minimum, we need to create a database for NetBox and assign it a username and password for authentication. This is done with the following commands.
44
-
45
-
!!! danger
46
-
**Do not use the password from the example.** Choose a strong, random password to ensure secure database authentication for your NetBox installation.
43
+
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.
47
44
48
45
```no-highlight
49
-
$ sudo -u postgres psql
50
-
psql (12.5 (Ubuntu 12.5-0ubuntu0.20.04.1))
51
-
Type "help" for help.
46
+
sudo -u postgres psql
47
+
```
52
48
53
-
postgres=# CREATE DATABASE netbox;
54
-
CREATE DATABASE
55
-
postgres=# CREATE USER netbox WITH PASSWORD 'J5brHrAXFLQSif0K';
56
-
CREATE ROLE
57
-
postgres=# GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;
58
-
GRANT
59
-
postgres=# \q
49
+
Within the shell, enter the following commands to create the database and user (role), substituting your own value for the password:
50
+
51
+
```postgresql
52
+
CREATE DATABASE netbox;
53
+
CREATE USER netbox WITH PASSWORD 'J5brHrAXFLQSif0K';
54
+
GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox;
60
55
```
61
56
57
+
!!! danger
58
+
**Do not use the password from the example.** Choose a strong, random password to ensure secure database authentication for your NetBox installation.
59
+
60
+
Once complete, enter `\q` to exit the PostgreSQL shell.
61
+
62
62
## Verify Service Status
63
63
64
-
You can verify that authentication works issuing the following command and providing the configured password. (Replace `localhost` with your database server if using a remote database.)
64
+
You can verify that authentication works by executing the `psql` command and passing the configured username and password. (Replace `localhost` with your database server if using a remote database.)
Copy file name to clipboardExpand all lines: docs/installation/3-netbox.md
+19-20Lines changed: 19 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,23 +36,21 @@ This documentation provides two options for installing NetBox: from a downloadab
36
36
Download the [latest stable release](https://github.com/netbox-community/netbox/releases) from GitHub as a tarball or ZIP archive and extract it to your desired path. In this example, we'll use `/opt/netbox` as the NetBox root.
It is recommended to install NetBox in a directory named for its version number. For example, NetBox v2.9.0 would be installed into `/opt/netbox-2.9.0`, and a symlink from `/opt/netbox/` would point to this location. This allows for future releases to be installed in parallel without interrupting the current installation. When changing to the new release, only the symlink needs to be updated.
45
+
It is recommended to install NetBox in a directory named for its version number. For example, NetBox v3.0.0 would be installed into `/opt/netbox-3.0.0`, and a symlink from `/opt/netbox/` would point to this location. (You can verify this configuration with the command `ls -l /opt | grep netbox`.) This allows for future releases to be installed in parallel without interrupting the current installation. When changing to the new release, only the symlink needs to be updated.
49
46
50
47
### Option B: Clone the Git Repository
51
48
52
49
Create the base directory for the NetBox installation. For this guide, we'll use `/opt/netbox`.
53
50
54
51
```no-highlight
55
-
sudo mkdir -p /opt/netbox/ && cd /opt/netbox/
52
+
sudo mkdir -p /opt/netbox/
53
+
cd /opt/netbox/
56
54
```
57
55
58
56
If `git` is not already installed, install it:
@@ -75,7 +73,7 @@ Next, clone the **master** branch of the NetBox GitHub repository into the curre
The `git clone` command should generate output similar to the following:
79
77
80
78
```
81
79
Cloning into '.'...
@@ -250,13 +248,8 @@ Once the virtual environment has been activated, you should notice the string `(
250
248
Next, we'll create a superuser account using the `createsuperuser` Django management command (via `manage.py`). Specifying an email address for the user is not required, but be sure to use a very strong password.
0 commit comments