Specified syntax for code blocks

This commit is contained in:
Jeremy Stretch
2016-11-30 12:01:45 -05:00
parent 7776cf9f73
commit 135f7b16ba
6 changed files with 46 additions and 47 deletions

View File

@@ -8,7 +8,7 @@
**CentOS/RHEL**
```
```shell
# yum install -y epel-release
# yum install -y gcc python2 python-devel python-pip libxml2-devel libxslt-devel libffi-devel graphviz openssl-devel
```
@@ -19,7 +19,7 @@ You may opt to install NetBox either from a numbered release or by cloning the m
Download the [latest stable release](https://github.com/digitalocean/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`.
```
```shell
# wget https://github.com/digitalocean/netbox/archive/vX.Y.Z.tar.gz
# tar -xzf vX.Y.Z.tar.gz -C /opt
# cd /opt/
@@ -31,28 +31,27 @@ Download the [latest stable release](https://github.com/digitalocean/netbox/rele
Create the base directory for the NetBox installation. For this guide, we'll use `/opt/netbox`.
```
# mkdir -p /opt/netbox/
# cd /opt/netbox/
```shell
# mkdir -p /opt/netbox/ && cd /opt/netbox/
```
If `git` is not already installed, install it:
**Debian/Ubuntu**
```
```shell
# apt-get install -y git
```
**CentOS/RHEL**
```
```shell
# yum install -y git
```
Next, clone the **master** branch of the NetBox GitHub repository into the current directory:
```
```shell
# git clone -b master https://github.com/digitalocean/netbox.git .
Cloning into '.'...
remote: Counting objects: 1994, done.
@@ -67,7 +66,7 @@ Checking connectivity... done.
Install the required Python packages using pip. (If you encounter any compilation errors during this step, ensure that you've installed all of the system dependencies listed above.)
```
```shell
# pip install -r requirements.txt
```
@@ -75,7 +74,7 @@ Install the required Python packages using pip. (If you encounter any compilatio
Move into the NetBox configuration directory and make a copy of `configuration.example.py` named `configuration.py`.
```
```shell
# cd netbox/netbox/
# cp configuration.example.py configuration.py
```
@@ -92,7 +91,7 @@ This is a list of the valid hostnames by which this server can be reached. You m
Example:
```
```python
ALLOWED_HOSTS = ['netbox.example.com', '192.0.2.123']
```
@@ -102,7 +101,7 @@ This parameter holds the database configuration details. You must define the use
Example:
```
```python
DATABASE = {
'NAME': 'netbox', # Database name
'USER': 'netbox', # PostgreSQL username
@@ -125,7 +124,7 @@ You may use the script located at `netbox/generate_secret_key.py` to generate a
Before NetBox can run, we need to install the database schema. This is done by running `./manage.py migrate` from the `netbox` directory (`/opt/netbox/netbox/` in our example):
```
```shell
# cd /opt/netbox/netbox/
# ./manage.py migrate
Operations to perform:
@@ -144,7 +143,7 @@ If this step results in a PostgreSQL authentication error, ensure that the usern
NetBox does not come with any predefined user accounts. You'll need to create a super user to be able to log into NetBox:
```
```shell
# ./manage.py createsuperuser
Username: admin
Email address: admin@example.com
@@ -155,7 +154,7 @@ Superuser created successfully.
# Collect Static Files
```
```shell
# ./manage.py collectstatic
You have requested to collect static files at the destination
@@ -176,7 +175,7 @@ NetBox ships with some initial data to help you get started: RIR definitions, co
!!! note
This step is optional. It's perfectly fine to start using NetBox without using this initial data if you'd rather create everything from scratch.
```
```shell
# ./manage.py loaddata initial_data
Installed 43 object(s) from 4 fixture(s)
```
@@ -185,7 +184,7 @@ Installed 43 object(s) from 4 fixture(s)
At this point, NetBox should be able to run. We can verify this by starting a development instance:
```
```shell
# ./manage.py runserver 0.0.0.0:8000 --insecure
Performing system checks...