Switch docs to mkdocs-material

This commit is contained in:
Jeremy Stretch 2021-02-24 21:21:17 -05:00
parent bec7ea7072
commit 3208c8317d
5 changed files with 55 additions and 53 deletions

View File

@ -7,23 +7,24 @@ This section entails the installation and configuration of a local PostgreSQL da
## Installation
#### Ubuntu
## Installation
Install the PostgreSQL server and client development libraries using `apt`.
=== "Ubuntu"
```no-highlight
sudo apt update
sudo apt install -y postgresql libpq-dev
```
```no-highlight
sudo apt update
sudo apt install -y postgresql libpq-dev
```
#### CentOS
=== "CentOS"
PostgreSQL 9.6 and later are available natively on CentOS 8.2. If using an earlier CentOS release, you may need to [install it from an RPM](https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/).
```no-highlight
sudo yum install -y postgresql-server libpq-devel
sudo postgresql-setup --initdb
```
```no-highlight
sudo yum install -y postgresql-server libpq-devel
sudo postgresql-setup --initdb
```
!!! info
PostgreSQL 9.6 and later are available natively on CentOS 8.2. If using an earlier CentOS release, you may need to [install it from an RPM](https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/).
CentOS configures ident host-based authentication for PostgreSQL by default. Because NetBox will need to authenticate using a username and password, modify `/var/lib/pgsql/data/pg_hba.conf` to support MD5 authentication by changing `ident` to `md5` for the lines below:

View File

@ -7,19 +7,19 @@
!!! note
NetBox v2.9.0 and later require Redis v4.0 or higher. If your distribution does not offer a recent enough release, you will need to build Redis from source. Please see [the Redis installation documentation](https://github.com/redis/redis) for further details.
### Ubuntu
=== "Ubuntu"
```no-highlight
sudo apt install -y redis-server
```
```no-highlight
sudo apt install -y redis-server
```
### CentOS
=== "CentOS"
```no-highlight
sudo yum install -y redis
sudo systemctl start redis
sudo systemctl enable redis
```
```no-highlight
sudo yum install -y redis
sudo systemctl start redis
sudo systemctl enable redis
```
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.

View File

@ -9,17 +9,17 @@ Begin by installing all system packages required by NetBox and its dependencies.
!!! note
NetBox v2.8.0 and later require Python 3.6, 3.7, or 3.8.
### Ubuntu
=== Ubuntu
```no-highlight
sudo apt install -y python3 python3-pip python3-venv python3-dev build-essential libxml2-dev libxslt1-dev libffi-dev libpq-dev libssl-dev zlib1g-dev
```
```no-highlight
sudo apt install -y python3 python3-pip python3-venv python3-dev build-essential libxml2-dev libxslt1-dev libffi-dev libpq-dev libssl-dev zlib1g-dev
```
### CentOS
=== CentOS
```no-highlight
sudo yum install -y gcc python36 python36-devel python3-pip libxml2-devel libxslt-devel libffi-devel openssl-devel redhat-rpm-config
```
```no-highlight
sudo yum install -y gcc python36 python36-devel python3-pip libxml2-devel libxslt-devel libffi-devel openssl-devel redhat-rpm-config
```
Before continuing with either platform, update pip (Python's package management tool) to its latest release:
@ -57,17 +57,17 @@ sudo mkdir -p /opt/netbox/ && cd /opt/netbox/
If `git` is not already installed, install it:
#### Ubuntu
=== Ubuntu
```no-highlight
sudo apt install -y git
```
```no-highlight
sudo apt install -y git
```
#### CentOS
=== CentOS
```no-highlight
sudo yum install -y git
```
```no-highlight
sudo yum install -y git
```
Next, clone the **master** branch of the NetBox GitHub repository into the current directory. (This branch always holds the current stable release.)
@ -89,20 +89,20 @@ Checking connectivity... done.
Create a system user account named `netbox`. We'll configure the WSGI and HTTP services to run under this account. We'll also assign this user ownership of the media directory. This ensures that NetBox will be able to save uploaded files.
#### Ubuntu
=== Ubuntu
```
sudo adduser --system --group netbox
sudo chown --recursive netbox /opt/netbox/netbox/media/
```
```
sudo adduser --system --group netbox
sudo chown --recursive netbox /opt/netbox/netbox/media/
```
#### CentOS
=== CentOS
```
sudo groupadd --system netbox
sudo adduser --system -g netbox netbox
sudo chown --recursive netbox /opt/netbox/netbox/media/
```
```
sudo groupadd --system netbox
sudo adduser --system -g netbox netbox
sudo chown --recursive netbox /opt/netbox/netbox/media/
```
## Configuration

View File

@ -1,2 +1,2 @@
mkdocs==1.1
mkdocs-material
git+https://github.com/cmacmackin/markdown-include.git

View File

@ -5,14 +5,15 @@ python:
install:
- requirements: docs/requirements.txt
theme:
name: readthedocs
navigation_depth: 3
name: material
extra_css:
- extra.css
markdown_extensions:
- admonition:
- admonition
- markdown_include.include:
headingOffset: 1
- pymdownx.superfences
- pymdownx.tabbed
nav:
- Introduction: 'index.md'
- Installation: