mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-11 21:10:29 +01:00
update docs to include installation in RHEL/CENTOS #122
Closed
opened 2025-12-29 15:33:56 +01:00 by adam
·
43 comments
No Branch/Tag Specified
main
update-changelog-comments-docs
feature-removal-issue-type
20911-dropdown
20239-plugin-menu-classes-mutable-state
21097-graphql-id-lookups
feature
fix_module_substitution
20923-dcim-templates
20044-elevation-stuck-lightmode
feature-ip-prefix-link
v4.5-beta1-release
20068-import-moduletype-attrs
20766-fix-german-translation-code-literals
20378-del-script
7604-filter-modifiers-v3
circuit-swap
12318-case-insensitive-uniqueness
20637-improve-device-q-filter
20660-script-load
19724-graphql
20614-update-ruff
14884-script
02496-max-page
19720-macaddress-interface-generic-relation
19408-circuit-terminations-export-templates
20203-openapi-check
fix-19669-api-image-download
7604-filter-modifiers
19275-fixes-interface-bulk-edit
fix-17794-get_field_value_return_list
11507-show-aggregate-and-rir-on-api
9583-add_column_specific_search_field_to_tables
v4.5.0
v4.4.10
v4.4.9
v4.5.0-beta1
v4.4.8
v4.4.7
v4.4.6
v4.4.5
v4.4.4
v4.4.3
v4.4.2
v4.4.1
v4.4.0
v4.3.7
v4.4.0-beta1
v4.3.6
v4.3.5
v4.3.4
v4.3.3
v4.3.2
v4.3.1
v4.3.0
v4.2.9
v4.3.0-beta2
v4.2.8
v4.3.0-beta1
v4.2.7
v4.2.6
v4.2.5
v4.2.4
v4.2.3
v4.2.2
v4.2.1
v4.2.0
v4.1.11
v4.1.10
v4.1.9
v4.1.8
v4.2-beta1
v4.1.7
v4.1.6
v4.1.5
v4.1.4
v4.1.3
v4.1.2
v4.1.1
v4.1.0
v4.0.11
v4.0.10
v4.0.9
v4.1-beta1
v4.0.8
v4.0.7
v4.0.6
v4.0.5
v4.0.3
v4.0.2
v4.0.1
v4.0.0
v3.7.8
v3.7.7
v4.0-beta2
v3.7.6
v3.7.5
v4.0-beta1
v3.7.4
v3.7.3
v3.7.2
v3.7.1
v3.7.0
v3.6.9
v3.6.8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v1.0.3
1.0.0
Labels
Clear labels
beta
breaking change
complexity: high
complexity: low
complexity: medium
needs milestone
netbox
pending closure
plugin candidate
pull-request
severity: high
severity: low
severity: medium
status: accepted
status: backlog
status: blocked
status: duplicate
status: needs owner
status: needs triage
status: revisions needed
status: under review
topic: GraphQL
topic: Internationalization
topic: OpenAPI
topic: UI/UX
topic: cabling
topic: event rules
topic: htmx navigation
topic: industrialization
topic: migrations
topic: plugins
topic: scripts
topic: templating
topic: testing
type: bug
type: deprecation
type: documentation
type: feature
type: housekeeping
type: translation
Mirrored from GitHub Pull Request
No Label
type: documentation
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/netbox#122
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aoyawale on GitHub (Jul 1, 2016).
The getting started guide can be followed almost completely but, it looks like the packages have diff names. Will have to figure out then update docs.
@bellwood commented on GitHub (Jul 1, 2016):
Getting started my have to become a general jump point to specific OS's -> web daemons -> etc
As this grows I expect the documentation to evolve but I don't know how much more can be stuffed into
getting-started.mdbefore people using it get overwhelmed@aoyawale commented on GitHub (Jul 1, 2016):
that is fine. Which ever way works as long we have it documented. I'll try to lsit the packages that I think we might need for RHEL/CENTOS it might be a longer list since I use the minimal_install.iso
@ryanmerolle commented on GitHub (Jul 1, 2016):
Yes I agree, as I normally use CentOS. I hit some roadblocks, so I followed the getting started in Ubuntu for now. I'm also working on this list as well. I'll be happy to contribute and edit as you develop this guide.
@aoyawale commented on GitHub (Jul 1, 2016):
for the moment I did yum install openssl* setuptools python-de* libxml* libxs* libffi* and the pip install -r requirements.txt worked after a few tries. I'll have to try to identify which exactly it is or the RHEL/CENTOS correct name.
@mdlayher commented on GitHub (Jul 1, 2016):
OS or distro-specific setup guides do sound good, but indeed,
getting-started.mdis already pretty lengthy. It might make sense to begin splitting it into a few different guides and havegetting-started.mdlink to OS or distro-specific guides instead.@aoyawale commented on GitHub (Jul 1, 2016):
I can get started on the RHEL/CENTOS specific and do a pull request when I'm done if they are no issues.
@aoyawale commented on GitHub (Jul 2, 2016):
@ryanmerolle have you been able to successfully install on centos? I'm using centos 7 and I run into issues later on when trying to reach the webserver.
@ryanmerolle commented on GitHub (Jul 2, 2016):
Nope. I plan to work on it after the holiday weekend.
Sent from my iPhone
@bradpeczka commented on GitHub (Jul 5, 2016):
@chagara - I've been able to get it running on RHEL7 with no issues, other than the noted differences in package names and a couple of quirks around the configuration of Gunicorn/Supervisor.
@aoyawale commented on GitHub (Jul 5, 2016):
@bradpeczka I was able to make a list of the rpms needed but, I think I started having problems with the nginx gunicorn/supervisor part. Its not working. What steps did you have to take to make that work? if you do not mind sharing.
@bradpeczka commented on GitHub (Jul 5, 2016):
@chagara I found this blog (https://rayed.com/wordpress/?p=1496) to be quite useful. I had issues getting the config includes to work, so just pasted the example Supervisor config from the
getting-started.mddocumentation there instead, though you'll need to modify the user to 'apache' or whatever nginx uses.I also slightly edited
gunicorn_config.pyby changing the command path to'/bin/gunicorn'and the user to 'apache'.@aoyawale commented on GitHub (Jul 5, 2016):
@bradpeczka thank you for the information. I'll try to see if I can make it work. So you used nginx or apache?
@dinoocch commented on GitHub (Jul 5, 2016):
@chagara We're currently using Centos 6 with netbox and no issues. I configured apache initially and switched everything to nginx for other reasons. Both worked with no apparent issues. What problems are you having?
@aoyawale commented on GitHub (Jul 5, 2016):
Well in Centos 7 the problem I'm having at the moment that it seems that nginx is not passing the config and just lands into the "It works !" page. At first I had issues with the packages but, I figured out the needed packages. Now I'm getting an error after I restart supervisord " ImportError: no module named netbox.wsgi" On centos 6 since it needs python 2.7 I need to install that. Do you mind sharing the steps you took or the commands? I must be missing something so simple that I'm over looking it.
@dinoocch commented on GitHub (Jul 5, 2016):
Hmm, sounds like a problem with your nginx configuration, and your gunicorn configuration, possibly your supervisord config. It may also be a permissions issue. I'd be happy to look at any of them if you can put them in a gist. Our steps are a bit convoluted because we're running netbox in a subdirectory, so a lot of the configuration looks a little different.
@aoyawale commented on GitHub (Jul 5, 2016):
I installed all the configs like described in the getting started guide. The only difference was the names of the packages and creating the sites-available since that is not on centos. Let me look at the config and post it. What other steps did you had to take?
@aoyawale commented on GitHub (Jul 5, 2016):
Just like the starting guide:
server {
listen 80;
}
command = '/bin/gunicorn'
pythonpath = '/opt/netbox/netbox'
bind = '127.0.0.1:8001'
workers = 3
user = 'apache'
[program:netbox]
command=gunicorn -c /opt/netbox/gunicorn_config.py netbox.wsgi
directory=/opt/netbox/netbox/
user=apache
@dinoocch commented on GitHub (Jul 5, 2016):
Ah, that's one issue. Your nginx configurations ought to go in /etc/nginx/conf.d/ (Assuming you are using an up-to-date nginx from the nginx repository
http://nginx.org/packages/centos/$releasever/$basearch/)Also, in the gunicorn configuration file, I used:
bind = '0.0.0.0:8001', not sure if this will make a difference for you or not. (I believe it will depend on your server setup)What error is gunicorn yielding when you try to start it?
@aoyawale commented on GitHub (Jul 5, 2016):
I do have the netbox.conf in /etc/nginx/conf.d/ I just paste it all together in there so you can see it together sorry for the confusion. It looks like now the gunicorn error has gone away since I binded to 0.0.0.0 like you mentioned but, its not showing all the page completely.

Getting this errors: 14:07:52 [error] 11000#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:07:52 [error] 11000#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:07:52 [error] 11000#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:07:52 [error] 11000#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:07:52 [error] 11000#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:07:52 [error] 11000#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:20:25 [error] 11092#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:20:27 [error] 11092#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:20:57 [error] 11127#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:20:58 [error] 11127#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:20:58 [error] 11127#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:20:59 [error] 11127#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:20:59 [error] 11127#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:25:17 [error] 11199#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:25:18 [error] 11199#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:25:18 [error] 11199#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:28:06 [error] 11199#0: *2 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:37:46 [error] 11312#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:37:47 [error] 11312#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:07 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:07 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:08 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:08 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:08 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:08 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:08 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:09 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:09 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:09 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:09 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:09 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:09 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:09 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:10 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:10 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:14 [error] 11409#0: *1 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:25 [error] 11411#0: *2 opendir() "/opt/netbox/netbox/static" failed (13: Permission denied), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 14:39:25 [error] 11411#0: *2 open() "/opt/netbox/netbox/static/favicon.ico" failed (2: No such file or directory), client: 192.168.5.70, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.5.59", referrer: "http://192.168.5.59/"
2016/07/02 14:39:25 [error] 11411#0: *2 open() "/opt/netbox/netbox/static/404.html" failed (2: No such file or directory), client: 192.168.5.70, server: _, request: "GET /favicon.ico HTTP/1.1", host: "192.168.5.59", referrer: "http://192.168.5.59/"
2016/07/02 15:10:11 [error] 11411#0: *4 "/opt/netbox/netbox/static/index.html" is not found (2: No such file or directory), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 15:10:11 [error] 11411#0: *4 open() "/opt/netbox/netbox/static/404.html" failed (2: No such file or directory), client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 15:28:56 [error] 11833#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 15:31:29 [emerg] 11901#0: unexpected end of file, expecting "}" in /etc/nginx/nginx.conf:48
2016/07/02 15:32:06 [error] 11943#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 15:36:12 [error] 11998#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 15:37:45 [error] 12047#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 15:37:46 [error] 12047#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 15:37:46 [error] 12047#0: *1 directory index of "/opt/netbox/netbox/static/" is forbidden, client: 192.168.5.70, server: _, request: "GET / HTTP/1.1", host: "192.168.5.59"
2016/07/02 15:39:36 [error] 12082#0: *1 "/opt/netbox/netbox/static/site/index.html" is not found (2: No such file or directory), client: 192.168.5.70, server: _, request: "GET /site/ HTTP/1.1", host: "192.168.5.59"
2016/07/02 15:51:25 [emerg] 12250#0: directive "location" has no opening "{" in /etc/nginx/nginx.conf:38
2016/07/02 15:53:06 [emerg] 12286#0: "location" directive is not allowed here in /etc/nginx/nginx.conf:54
2016/07/02 15:53:26 [emerg] 12320#0: unexpected "}" in /etc/nginx/nginx.conf:56
2016/07/02 15:53:53 [emerg] 12357#0: unexpected end of file, expecting "}" in /etc/nginx/nginx.conf:55
2016/07/02 15:54:21 [crit] 12397#0: *1 connect() to 127.0.0.1:8001 failed (13: Permission denied) while connecting to upstream, client: 192.168.5.70, server: netbox-centos7, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8001/", host: "192.168.5.59", referrer: "http://192.168.5.59/"
2016/07/02 15:54:22 [crit] 12397#0: *1 connect() to 127.0.0.1:8001 failed (13: Permission denied) while connecting to upstream, client: 192.168.5.70, server: netbox-centos7, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8001/", host: "192.168.5.59", referrer: "http://192.168.5.59/"
Trying to figure out where the permission issue is. I have nginx permission for the files but, not sure if that is the correct way or not.
@dinoocch commented on GitHub (Jul 5, 2016):
Odd. Can you show the output of
ls -la /opt/netbox/netbox/static?@aoyawale commented on GitHub (Jul 5, 2016):
root@netbox-centos7 ~]# ls -la /opt/netbox/netbox/static/
total 16
drwxr-xr-x. 12 nginx nginx 4096 Jul 2 15:25 .
drwxr-xr-x. 13 nginx nginx 4096 Jul 2 15:25 ..
drwxr-xr-x. 6 nginx nginx 47 Jul 2 15:25 admin
drwxr-xr-x. 5 nginx nginx 37 Jul 2 15:25 bootstrap-3.3.6-dist
drwxr-xr-x. 2 nginx nginx 21 Jul 2 15:25 css
drwxr-xr-x. 5 nginx nginx 35 Jul 2 15:25 debug_toolbar
drwxr-xr-x. 3 nginx nginx 39 Jul 2 15:25 django_tables2
drwxr-xr-x. 6 nginx nginx 72 Jul 2 15:25 font-awesome-4.6.3
drwxr-xr-x. 4 nginx nginx 4096 Jul 2 15:25 jquery-ui-1.11.4
drwxr-xr-x. 2 nginx nginx 100 Jul 2 15:25 js
drwxr-xr-x. 6 nginx nginx 47 Jul 2 15:25 rest_framework
drwxr-xr-x. 5 nginx nginx 4096 Jul 2 15:25 rest_framework_swagger
@dinoocch commented on GitHub (Jul 5, 2016):
Did you run
python2.7 ./manage.py collectstatic?@aoyawale commented on GitHub (Jul 5, 2016):
yes and I re-ran it again
You have requested to collect static files at the destination
location as specified in your settings:
This will overwrite existing files!
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
0 static files copied to '/opt/netbox/netbox/static', 212 unmodified.
@dinoocch commented on GitHub (Jul 5, 2016):
I see, looks like a permissions issue then. What are the permissions on
/opt/netbox/and/opt/netbox/netbox/?@aoyawale commented on GitHub (Jul 5, 2016):
[vagrant@netbox-centos7 ~]$ ls -laht /opt/netbox/
total 68K
drwxr-xr-x. 7 nginx nginx 4.0K Jul 5 16:34 .
-rw-rw-r-- 1 nginx nginx 109 Jul 5 16:34 gunicorn_config.py
drwxr-xr-x. 13 nginx nginx 4.0K Jul 2 15:25 netbox
drwxr-xr-x. 8 nginx nginx 4.0K Jul 2 15:10 .git
-rwxr-xr-x. 1 nginx nginx 318 Jul 2 15:10 requirements.txt
drwxr-xr-x. 2 nginx nginx 23 Jul 2 15:10 scripts
-rwxr-xr-x. 1 nginx nginx 849 Jul 2 15:10 upgrade.sh
drwxr-xr-x. 2 nginx nginx 4.0K Jul 2 15:10 docs
-rwxr-xr-x. 1 nginx nginx 3.4K Jul 2 15:10 CONTRIBUTING.md
drwxr-xr-x. 2 nginx nginx 75 Jul 2 15:10 docker
-rwxr-xr-x. 1 nginx nginx 1.6K Jul 2 15:10 docker-compose.yml
-rwxr-xr-x. 1 nginx nginx 589 Jul 2 15:10 Dockerfile
-rwxr-xr-x. 1 nginx nginx 58 Jul 2 15:10 .gitignore
-rwxr-xr-x. 1 nginx nginx 10K Jul 2 15:10 LICENSE.txt
-rwxr-xr-x. 1 nginx nginx 4.4K Jul 2 15:10 README.md
-rwxr-xr-x. 1 nginx nginx 134 Jul 2 15:10 .travis.yml
drwxr-xr-x. 3 nginx nginx 19 Jul 2 15:10 ..
drwxr-xr-x. 7 nginx nginx 4.0K Jul 5 16:34 ..
drwxr-xr-x. 3 nginx nginx 4.0K Jul 2 15:26 utilities
drwxr-xr-x. 2 nginx nginx 4.0K Jul 2 15:26 netbox
drwxr-xr-x. 12 nginx nginx 4.0K Jul 2 15:25 static
drwxr-xr-x. 13 nginx nginx 4.0K Jul 2 15:25 .
drwxr-xr-x. 6 nginx nginx 4.0K Jul 2 15:25 secrets
drwxr-xr-x. 2 nginx nginx 4.0K Jul 2 15:25 users
drwxr-xr-x. 5 nginx nginx 4.0K Jul 2 15:25 ipam
drwxr-xr-x. 6 nginx nginx 4.0K Jul 2 15:25 dcim
drwxr-xr-x. 4 nginx nginx 4.0K Jul 2 15:25 circuits
drwxr-xr-x. 6 nginx nginx 4.0K Jul 2 15:25 extras
drwxr-xr-x. 9 nginx nginx 4.0K Jul 2 15:10 templates
drwxr-xr-x. 7 nginx nginx 100 Jul 2 15:10 project-static
-rwxr-xr-x. 1 nginx nginx 249 Jul 2 15:10 manage.py
-rwxr-xr-x. 1 nginx nginx 313 Jul 2 15:10 generate_secret_key.py
@aoyawale commented on GitHub (Jul 5, 2016):
BTW I was able to get it to work on Ubuntu right away but, no one at work is exposed to Ubuntu so I'm trying to get it to work on Centos.
@dinoocch commented on GitHub (Jul 5, 2016):
Interesting. Your permissions are odd, but they shouldn't break anything. README's are usually not executable.
I believe I know what the issue could be though...CentOS ships with SELinux set to enforcing by default.
To check, you can do
# getenforceIf you want to fix it quickly you can do
# setenforce PermissiveOr if you want to fix it correctly, use
# chcon -Rt httpd_sys_content_t /opt/netbox/netbox/staticAlternately, if you really don't like SELinux, you can
# setenforce DisabledTo make SELinux state changes permanent, edit
/etc/sysconfig/selinux@aoyawale commented on GitHub (Jul 6, 2016):
started from scratch and I'm getting this page. Turned selinux off.

@dinoocch commented on GitHub (Jul 6, 2016):
Did you make and run migrations?
@aoyawale commented on GitHub (Jul 6, 2016):
yes, I did the ./manage migrate and ./manage collectstatic
@aoyawale commented on GitHub (Jul 6, 2016):
ok, so the page loads but, like before not completely.

@dinoocch commented on GitHub (Jul 6, 2016):
Alright, I spun up a VM to try and reproduce your issue. Here's my steps to get it working:
(You can even run it as a script if you're brave 😄 )
CENTOS 7 - Centos 6 is similar, but slightly different
I'm not completely sure what/if anything you missed, but the above seems to work for me on a clean vm. If you still have issues let me know!
@aoyawale commented on GitHub (Jul 6, 2016):
@dinoocch I did everything but, there is something not letting the page stuff load. I ran the server from manage and get this:
[06/Jul/2016 02:54:00] "GET /static/bootstrap-3.3.6-dist/css/bootstrap.min.css HTTP/1.1" 404 123
[06/Jul/2016 02:54:00] "GET /static/font-awesome-4.6.3/css/font-awesome.min.css HTTP/1.1" 404 124
[06/Jul/2016 02:54:00] "GET /static/css/base.css HTTP/1.1" 404 93
[06/Jul/2016 02:54:00] "GET /static/jquery-ui-1.11.4/jquery-ui.css HTTP/1.1" 404 111
[06/Jul/2016 02:54:00] "GET /static/jquery-ui-1.11.4/jquery-ui.min.js HTTP/1.1" 404 114
[06/Jul/2016 02:54:00] "GET /static/js/jquery-2.1.4.min.js HTTP/1.1" 404 103
[06/Jul/2016 02:54:00] "GET /static/bootstrap-3.3.6-dist/js/bootstrap.min.js HTTP/1.1" 404 121
[06/Jul/2016 02:54:00] "GET /static/js/forms.js HTTP/1.1" 404 92
[06/Jul/2016 02:54:00] "GET /static/jquery-ui-1.11.4/jquery-ui.min.js HTTP/1.1" 404 114
[06/Jul/2016 02:54:00] "GET /static/bootstrap-3.3.6-dist/js/bootstrap.min.js HTTP/1.1" 404 121
[06/Jul/2016 02:54:00] "GET /static/js/forms.js HTTP/1.1" 404 92
[06/Jul/2016 02:54:02] "GET / HTTP/1.1" 200 15831
[06/Jul/2016 02:54:03] "GET /static/bootstrap-3.3.6-dist/css/bootstrap.min.css HTTP/1.1" 404 123
[06/Jul/2016 02:54:03] "GET /static/font-awesome-4.6.3/css/font-awesome.min.css HTTP/1.1" 404 124
[06/Jul/2016 02:54:03] "GET /static/jquery-ui-1.11.4/jquery-ui.css HTTP/1.1" 404 111
[06/Jul/2016 02:54:03] "GET /static/css/base.css HTTP/1.1" 404 93
[06/Jul/2016 02:54:03] "GET /static/js/jquery-2.1.4.min.js HTTP/1.1" 404 103
[06/Jul/2016 02:54:03] "GET /static/bootstrap-3.3.6-dist/js/bootstrap.min.js HTTP/1.1" 404 121
[06/Jul/2016 02:54:03] "GET /static/jquery-ui-1.11.4/jquery-ui.min.js HTTP/1.1" 404 114
[06/Jul/2016 02:54:03] "GET /static/js/forms.js HTTP/1.1" 404 92
[06/Jul/2016 02:54:03] "GET /static/jquery-ui-1.11.4/jquery-ui.min.js HTTP/1.1" 404 114
[06/Jul/2016 02:54:03] "GET /static/bootstrap-3.3.6-dist/js/bootstrap.min.js HTTP/1.1" 404 121
[06/Jul/2016 02:54:03] "GET /static/js/forms.js HTTP/1.1" 404 92
[06/Jul/2016 02:54:16] "GET / HTTP/1.1" 200 15831
[06/Jul/2016 02:54:16] "GET /static/bootstrap-3.3.6-dist/css/bootstrap.min.css HTTP/1.1" 404 123
[06/Jul/2016 02:54:16] "GET /static/font-awesome-4.6.3/css/font-awesome.min.css HTTP/1.1" 404 124
[06/Jul/2016 02:54:16] "GET /static/jquery-ui-1.11.4/jquery-ui.css HTTP/1.1" 404 111
[06/Jul/2016 02:54:16] "GET /static/css/base.css HTTP/1.1" 404 93
[06/Jul/2016 02:54:16] "GET /static/js/jquery-2.1.4.min.js HTTP/1.1" 404 103
[06/Jul/2016 02:54:16] "GET /static/jquery-ui-1.11.4/jquery-ui.min.js HTTP/1.1" 404 114
[06/Jul/2016 02:54:16] "GET /static/bootstrap-3.3.6-dist/js/bootstrap.min.js HTTP/1.1" 404 121
[06/Jul/2016 02:54:16] "GET /static/js/forms.js HTTP/1.1" 404 92
[06/Jul/2016 02:54:16] "GET /static/jquery-ui-1.11.4/jquery-ui.min.js HTTP/1.1" 404 114
[06/Jul/2016 02:54:16] "GET /static/bootstrap-3.3.6-dist/js/bootstrap.min.js HTTP/1.1" 404 121
[06/Jul/2016 02:54:16] "GET /static/js/forms.js HTTP/1.1" 404 92
most of this are in red.
@aoyawale commented on GitHub (Jul 6, 2016):
alright so I restarted and its good to go. I think the main problem could had been what user to run the services as. I used the netbox user u added in your instructions. I'm going to try this in a couple of servers and see how it goes 👍 I really appreciate it all the help. Do you mind If I use this to put it in a doc and make a pull request ?
@nichols-356 commented on GitHub (Jul 6, 2016):
@dinoocch thank you for your very detailed instructions. I did run into a problem along the way with pip install and it appears that it might be stemmed from "yum install python-dev" instead of the correct "yum install python-devel". Hope this helps some other people.
Also, I needed to run "setsebool httpd_can_network_connect 1" to keep selinux from denying the connections.
@dinoocch commented on GitHub (Jul 6, 2016):
@chagara Sure, go ahead! Glad I could help.
@nichols-356 Thanks, fixed those and added a bit about SELinux. Glad I could help!
@aoyawale commented on GitHub (Jul 6, 2016):
@dinooch thanks so much for the help. What do you think is the problem when the pages do not load right?
@dinoocch commented on GitHub (Jul 6, 2016):
@chagara I'm not completely sure. It could have been a lot of things, and without spending time with the broken installation, I'm not sure I can give you a definitive answer. Are you still having any issues?
@aoyawale commented on GitHub (Jul 6, 2016):
@dinoocch I tried to deploy it at work so we can use it and I'm stuck in that part where the pages do not load. I followed ur guide and everything. I apologize I never used django or python so I'm still learning this.
@aoyawale commented on GitHub (Jul 6, 2016):
is the python-gunicorn from the epel repo or pip?
@dinoocch commented on GitHub (Jul 6, 2016):
Either should work.
This is very odd. Are there any nginx errors (/var/log/nginx/errors.log) and does django work correctly when run using
python2.7 manage.py runserver 0.0.0.0:8080?@aoyawale commented on GitHub (Jul 6, 2016):
If run it with manage the same thing happens. Its like its not loading the html and all those files correctly.
@aoyawale commented on GitHub (Jul 6, 2016):
ok so I finally got it working. I got ownership of netbox to nginx but, ran the supervisord config and gunicorn as root. After restarting everything it seemed to work. Dont know how since this has been the strangest thing I ever seen.