Skip to content

Commit

Permalink
Fixed some more documentation issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
pflarr committed Apr 11, 2017
1 parent d3c37f6 commit 85e3290
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -97,7 +97,7 @@ common-configs: ${DESTDIR}/etc/syslog.conf ${DESTDIR}/etc/logrotate.conf ${DESTD
echo "[include]" >> ${SUPERVISORD_CONF}; \
echo "files = ${DESTDIR}/etc/supervisord*.conf" >> ${SUPERVISORD_CONF}; \
fi
if service supervisor; then \
if service supervisor status 1>/dev/null 2>&1; then \
service supervisor restart; \
else \
service supervisord restart; \
Expand Down
19 changes: 13 additions & 6 deletions README.md
Expand Up @@ -41,7 +41,10 @@ make install-monolithic
- Like with most Makefiles, you can set the DESTDIR environment variable to specify where to
install the system. `make install-search-head DESTDIR=/var/mypcaplocation`
- This includes installing in place: `make install-capture-node DESTDIR=$(pwd)`. In this case, PcapDB
won't install system scripts for various needed components, and it will run as the installing user.
won't install system scripts for various needed components. You will have to run it manually, see
below.
- If you're behind a proxy, you'll need to specify a proxy connection string using PROXY=host:port as
part of the make command.

To make your life easier, however, you should work make sure the indexing code builds cleanly by running 'make' in the 'indexer/' directory.

Expand All @@ -65,25 +68,29 @@ The core/bin/post-install.sh script will handle the vast majority of the system

This will set up the databases and rabbitmq.


## 3-2 DESTDIR/etc/pcapdb.cfg
This is the main Pcapdb config file. You must set certain values before PcapDB will run at all.
There are a few things you need to set in here manually:
- (On capture nodes) The search head db password
- (On capture nodes) The rabbitmq password
- __(On capture nodes) The search head db password__
- __(On capture nodes) The rabbitmq password__
- Both of the above should be in the search head's pcapdb.cfg file.
- (On search head) The local mailserver.
- __(On search head) The local mailserver.__
- If you don't have one, I'd start with installing Postfix. It even has selectable install
settings that will configure it as a local mailserver for you.

## 3-3 Add an admin user (Search Head Only)
You'll need to create an admin user.
```
sudo su - capture
./bin/python core/manage.py add_user <username> <first_name> <last_name> <email>
```
- This will email you a link to use to set that user's password.
- (This is why email had to be set up).
- root@localhost is a reasonable email address, if you need it.
- *Note there manage.py also has a __createsuperuser__ command, which shouldn't be used.*

## 3-4 That should be it.
You should be able to get to the login screen on the https port of the search head.
You should be able to get to login with your admin account.

## 3-5 pfring-zc drivers
One more thing. You should install the drivers specific to your capture card for pfring-zc. The
Expand Down
6 changes: 4 additions & 2 deletions core/bin/post-install.sh
Expand Up @@ -179,6 +179,8 @@ if [ ${IS_CAPTURE_NODE} -eq 0 ]; then
# (capture).
sudo -u ${PCAPDB_USER} ./bin/python core/manage.py migrate --database=capture_node

sudo -u ${PCAPDB_USER} ./bin/python core/manage.py collectstatic

if [ ${IS_SEARCH_HEAD} -eq 1 ]; then
echo -e "\033[1;31m"
echo "You will still have to do the following manually."
Expand All @@ -187,8 +189,8 @@ if [ ${IS_CAPTURE_NODE} -eq 0 ]; then
echo " - Restart everything in supervisorctl"
echo -e "\033[0m"
fi
supervisord restart capture_runner
supervisorctl restart capture_runner
fi

supervisord restart pcapdb_celery
supervisorctl restart pcapdb_celery

2 changes: 1 addition & 1 deletion etc/supervisord_sh.conf.tmpl
@@ -1,5 +1,5 @@
[program:pcapdb_uwsgi]
command=env uwsgi --ini DESTDIR/etc/uwsgi.ini --uid capture --gid WWW_USER --logto DESTDIR/log/uwsgi.log --plugins=python3
command=DESTDIR/bin/uwsgi --ini DESTDIR/etc/uwsgi.ini --uid capture --gid WWW_USER --logto DESTDIR/log/uwsgi.log
autorestart=true
user=root
stopsignal=KILL
Expand Down
8 changes: 6 additions & 2 deletions sys_requirements.md
Expand Up @@ -8,7 +8,7 @@ __The version numbers listed are the versions that the system was tested on.__

## On Debian/Ubuntu
On all nodes:
- `apt install -y postgresql postgresql-server-dev-all tshark python3 python3-pip python3-dev virtualenv uwsgi-plugin-python libsasl2-dev libldap2-dev supervisor dkms`
- `apt install -y postgresql postgresql-server-dev-all tshark python3 python3-pip python3-dev virtualenv uwsgi-plugin-python3 libsasl2-dev libldap2-dev supervisor dkms`

On the search head:
- `apt install -y rabbitmq-server nginx`
Expand All @@ -19,6 +19,10 @@ On the capture nodes:
If you're building from source:
- `apt install -y cmake libnuma-dev libssl-dev libhugetlbfs-dev libpcap-dev`

You'll also need the pfring packages from http://packages.ntop.org
- x86\_64/PF\_RING/pfring
- all/pfring-dkms

# Detailed General Requirements
## PostGres
Postgres provides package servers for each of their versions most major linux distributions.
Expand Down Expand Up @@ -56,7 +60,7 @@ Needed by the python ldap package

### Needed on Debian based systems
We'll be using uwsgi to server the interface, but we'll install it through pip.
- uwsgi-plugin-python
- uwsgi-plugin-python3

## mlocate
The makefile uses mlocate to check where certain things are.
Expand Down

0 comments on commit 85e3290

Please sign in to comment.