diff --git a/docs/installation/netbox.md b/docs/installation/netbox.md index 51ab09de5..042943cce 100644 --- a/docs/installation/netbox.md +++ b/docs/installation/netbox.md @@ -1,39 +1,17 @@ # Installation -NetBox requires following system dependencies: +**Debian/Ubuntu** -Debian/Ubuntu - -* python2.7 -* python-dev -* python-pip -* libxml2-dev -* libxslt1-dev -* libffi-dev -* graphviz -* libpq-dev -* libssl-dev - -Centos/RHEL - -* python27 -* python-devel -* git -* python-pip -* libxml2-devel -* libxslt-devel -* libffi-devel -* graphviz -* openssl-devel - -### Debian/Ubuntu ``` -# sudo apt-get install -y python2.7 python-dev python-pip libxml2-dev libxslt1-dev libffi-dev graphviz libpq-dev libssl-dev +# apt-get install -y python2.7 python-dev python-pip libxml2-dev libxslt1-dev libffi-dev graphviz libpq-dev libssl-dev ``` -## Centos/RHEL + +**CentOS/RHEL** + +``` +# yum install -y epel-release +# yum install -y gcc python2 python-devel python-pip libxml2-devel libxslt-devel libffi-devel graphviz openssl-devel ``` -# sudo yum install -y epel-release -# sudo yum install -y python27 python-devel git python-pip libxml2-devel lbxslt-devel libffi-devel graphviz.x_86_64 openssl-devel You may opt to install NetBox either from a numbered release or by cloning the master branch of its repository on GitHub. @@ -60,9 +38,16 @@ Create the base directory for the NetBox installation. For this guide, we'll use If `git` is not already installed, install it: +**Debian/Ubuntu** + ``` -# sudo apt-get install -y git -# sudo yum install -y git +# apt-get install -y git +``` + +**CentOS/RHEL** + +``` +# yum install -y git ``` Next, clone the **master** branch of the NetBox GitHub repository into the current directory: @@ -83,7 +68,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.) ``` -# sudo pip install -r requirements.txt +# pip install -r requirements.txt ``` # Configuration diff --git a/docs/installation/postgresql.md b/docs/installation/postgresql.md index c2eac37ba..a4c898bad 100644 --- a/docs/installation/postgresql.md +++ b/docs/installation/postgresql.md @@ -2,31 +2,33 @@ NetBox requires a PostgreSQL database to store data. MySQL is not supported, as # Installation -The following packages are needed to install PostgreSQL with Python support: +**Debian/Ubuntu** -Debian/Ubuntu - -* postgresql -* libpq-dev -* python-psycopg2 - -Centos/RHEL - -* postgresql -* postgresql-server -* postgresql-libs -* postgresql-devel - -Debian/Ubuntu ``` -# sudo apt-get install -y postgresql libpq-dev python-psycopg2 -``` -Centos/RHEL -``` -# sudo yum install postgresql postgresql-server postgresql-libs postgresql-devel +# apt-get install -y postgresql libpq-dev python-psycopg2 ``` -# Configuration +**CentOS/RHEL** + +``` +# yum install -y postgresql postgresql-server postgresql-devel python-psycopg2 +# postgresql-setup initdb +``` + +If using CentOS, modify the PostgreSQL configuration to accept password-based authentication by replacing `ident` with `md5` for all host entries within `/var/lib/pgsql/data/pg_hba.conf`. For example: + +``` +host all all 127.0.0.1/32 md5 +host all all ::1/128 md5 +``` + +Then, start the service: + +``` +# systemctl start postgresql +``` + +# Database Creation 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.