The netbox installation step 3 is regretably Ubuntu-centric. The developer, Jeremey Stretch, seems to have no interest in remedying this anti-production oversight.
It looks like there is a healthy ansible role for netbox worth trying RSN.
Josphat Mutai has provided a complete replacement set of installation instructions for installing netbox on centos 7. This is very handy, but it could be better:
- Josphat disables SELinux right off of the bat. "As we will be using custom TCP ports, it is recommended to disable or put SELinux in permissive mode unless you know how to work with the tool." That's more explanation than most people give, but it still seems a bit funky. I'm not trying to work around this yet. It might be easy.
- Josphat also gives you the options of apache or nginx just as Jeremy did, but there's no mention of haproxy. Why wouldn't haproxy work nicely for this? Who knows? I'm not trying to work around this yet. It should be easy.
- no
https
configuration - Both also recommend using supervisor which seems easy to avoid. I'm looking into doing this with the native systemd. See also askubuntu, steffen-lindner, and the top comment on this Hacker News discussion.
- gunicorn runs on
127.0.0.1:8001
with 3 workers - nginx runs on 80
server {
listen 80;
server_name netbox.telmate.cc;
client_max_body_size 25m;
location /static/ {
alias /opt/netbox/netbox/static/;
}
location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
}
}