Browse Source

#447: Correcting CentOS installation docs

Jeremy Stretch 8 years ago
parent
commit
0001bbc966
2 changed files with 34 additions and 47 deletions
  1. 17 32
      docs/installation/netbox.md
  2. 17 15
      docs/installation/postgresql.md

+ 17 - 32
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
+```
+# apt-get install -y python2.7 python-dev python-pip libxml2-dev libxslt1-dev libffi-dev graphviz libpq-dev libssl-dev
+```
 
-* python27
-* python-devel
-* git
-* python-pip
-* libxml2-devel
-* libxslt-devel  
-* libffi-devel
-* graphviz
-* openssl-devel
+**CentOS/RHEL**
 
-### Debian/Ubuntu
-```
-# sudo apt-get install -y python2.7 python-dev python-pip libxml2-dev libxslt1-dev libffi-dev graphviz libpq-dev libssl-dev
 ```
-## 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**
+
+```
+# apt-get install -y git
+```
+
+**CentOS/RHEL**
+
 ```
-# sudo apt-get install -y git
-# sudo yum install -y git
+# 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

+ 17 - 15
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
+```
+# apt-get install -y postgresql libpq-dev python-psycopg2
+```
 
-* postgresql
-* libpq-dev
-* python-psycopg2
+**CentOS/RHEL**
 
-Centos/RHEL
+```
+# yum install -y postgresql postgresql-server postgresql-devel python-psycopg2
+# postgresql-setup initdb
+```
 
-* postgresql
-* postgresql-server
-* postgresql-libs
-* postgresql-devel
+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:
 
-Debian/Ubuntu
 ```
-# sudo apt-get install -y postgresql libpq-dev python-psycopg2
+host    all             all             127.0.0.1/32            md5
+host    all             all             ::1/128                 md5
 ```
-Centos/RHEL
+
+Then, start the service:
+
 ```
-# sudo yum install postgresql postgresql-server postgresql-libs postgresql-devel
+# systemctl start postgresql
 ```
 
-# Configuration
+# 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.