Fix up CentOS installation instructions; add troubleshooting guide

This commit is contained in:
Jeremy Stretch 2020-02-28 17:31:51 -05:00
parent 1b6f721e50
commit 22ec11c766
4 changed files with 23 additions and 6 deletions

View File

@ -21,8 +21,8 @@ If a recent enough version of PostgreSQL is not available through your distribut
CentOS 7.5 does not ship with a recent enough version of PostgreSQL, so it will need to be installed from an external repository. The instructions below show the installation of PostgreSQL 9.6. CentOS 7.5 does not ship with a recent enough version of PostgreSQL, so it will need to be installed from an external repository. The instructions below show the installation of PostgreSQL 9.6.
```no-highlight ```no-highlight
# yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm # yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
# yum install postgresql96 postgresql96-server postgresql96-devel # yum install -y postgresql96 postgresql96-server postgresql96-devel
# /usr/pgsql-9.6/bin/postgresql96-setup initdb # /usr/pgsql-9.6/bin/postgresql96-setup initdb
``` ```

View File

@ -9,7 +9,10 @@
#### CentOS #### CentOS
```no-highlight ```no-highlight
# yum install -y epel-release
# yum install -y redis # yum install -y redis
# systemctl start redis
# 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. 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

@ -11,10 +11,8 @@ This section of the documentation discusses installing and configuring the NetBo
#### CentOS #### CentOS
```no-highlight ```no-highlight
# yum install -y epel-release
# yum install -y gcc python36 python36-devel python36-setuptools libxml2-devel libxslt-devel libffi-devel openssl-devel redhat-rpm-config # yum install -y gcc python36 python36-devel python36-setuptools libxml2-devel libxslt-devel libffi-devel openssl-devel redhat-rpm-config
# easy_install-3.6 pip # easy_install-3.6 pip
# ln -s /usr/bin/python3.6 /usr/bin/python3
``` ```
## Download NetBox ## Download NetBox
@ -72,9 +70,12 @@ 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 local files. 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 local files.
!!! note
CentOS users may need to create the `netbox` group first.
``` ```
# adduser --system --group netbox # adduser --system --group netbox
# chown --recursive netbox /opt/netbox/netbox/media/` # chown --recursive netbox /opt/netbox/netbox/media/
``` ```
## Set Up Python Environment ## Set Up Python Environment

View File

@ -146,7 +146,20 @@ You can use the command `systemctl status netbox` to verify that the WSGI servic
... ...
``` ```
At this point, you should be able to connect to the HTTP service at the server name or IP address you provided. If you are unable to connect, check that the nginx service is running and properly configured. If you receive a 502 (bad gateway) error, this indicates that gunicorn is misconfigured or not running. At this point, you should be able to connect to the HTTP service at the server name or IP address you provided.
!!! info !!! info
Please keep in mind that the configurations provided here are bare minimums required to get NetBox up and running. You may want to make adjustments to better suit your production environment. Please keep in mind that the configurations provided here are bare minimums required to get NetBox up and running. You may want to make adjustments to better suit your production environment.
## Troubleshooting
If you are unable to connect to the HTTP server, check that:
* Nginx/Apache is running and configured to listen on the correct port.
* Access is not being blocked by a firewall. (Try connecting locally from the server itself.)
If you are able to connect but receive a 502 (bad gateway) error, check the following:
* The NetBox system process (gunicorn) is running: `systemctl status netbox`
* nginx/Apache is configured to connect to the port on which gunicorn is listening (default is 8001).
* SELinux is not preventing the reverse proxy connection. You may need to allow HTTP network connections with the command `setsebool -P httpd_can_network_connect 1`