-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathINSTALL
41 lines (32 loc) · 1.68 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
INSTALL for Banditvis
====================
Thomas Steinbrenner <[email protected]>
v0.2, February 2011
This software is licensed under the GNU Lesser General Public License.
== Requirements
see README
== Installation
. Postgres:
. Switch to the DBadmin. (Run: su postgres )
. Create a user. (Execute: "CREATE USER <<user>> WITH PASSWORD '<<password>>';" )
. Create a database. (Execute: "CREATE DATABASE database;" )
. Update banditvis/config.ini
. Change owner. (Execute: "ALTER DATABASE database OWNER TO user;" )
. Load postgis extensions. (Debian: psql -d database -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql )
. Load spatial reference system extensions. (Debian: psql -d banditvis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql )
. Add tables. (Execute: "CREATE TABLE bandits (key text NOT NULL, ip_address inet, offence text, count bigint DEFAULT 1, last_seen timestamp with time zone, status text);" ) #UPDATE
. Add a geometry column. (Execute: "SELECT AddGeometryColumn ('bandits', 'location', 4326, 'POINT', 2);" )
. Add the add_bandit function. (Execute:"
#UPDATE
. GeoIP:
. Download the latest GeoLiteCity.dat database to data/GeoIP/ (Run: ./update_geoip.py)
. Webserver:
. Create the directory /var/lib/banditvis/output
. Create an Alias from /var/lib/banditvis/output to <<webroot>>/banditvis/output/ .
. Copy the content of interactive/ to <<webroot>>/banditvis/ .
. fail2ban:
. Add "&& (cd /<<your-banditvis-dir>>/ && ./add_bandit.py <ip> <name>)" to the "actionban"-line of your fail2ban configuration
. Restart or reload fail2ban.
. cronjob:
. add a cronjob that runs draw_pointmap.py && write_kml.py
. (optional) add a cronjob that runs update_geoip.py