summaryrefslogtreecommitdiff
path: root/INSTALL
blob: f26a6f993bc8b18666e142b9cfd0d32b8c845f9c (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Installation Instructions
-------------------------

Refer to README for a basic information about the different BEINC components
and their software requirements!


Installing the dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~


Gentoo GNU/Linux 2014, 2015
..........................

# emerge -va dev-python/pyopenssl dev-python/twisted-web dev-python/notify-python dev-python/pyosd 


Ubuntu GNU/Linux
................

# apt-get install python-openssl python-twisted-web python-notify2 python-pyosd 


FreeBSD 9, 10
.............

# cd /usr/ports/security/py-openssl
# make install clean

# cd /usr/ports/www/py-twistedWeb
# make install clean

# cd /usr/ports/devel/py-notify
# make install clean

# cd /usr/ports/misc/py-osd
# make install clean


Intallation using virtualenv and pip
....................................

Very often you are not the administrator of the server hosting your BEINC server
This is where virtualenv may become handy (provided that it has been installed):
$ virtualenv beinc_installation
$ cd beinc_installation
$ source bin/activate
$ pip install Twisted
$ pip install pyopenssl
$ cd beinc-<version>
$ ./beinc_server.py -h


Installing and setting up BEINC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Unpack the latest version of BEINC
$ tar zxvf beinc-<version>.tar.gz

$cd beinc-<version>
Read the README file

You should now have a basic understanding about the different BEINC components
and how they interact with each other.
beinc_server.py and beinc_weechat.py are using a .json configuration file.
Read beinc_config_sample.json.readme where every configuration option is explined.
Decide on a use-strategy and place the different components to their locations:

beinc_server.py:
Create a configuration file based on beinc_config_sample.json, defining your instances
Start the BEINC server:
$ ./beinc_server.py -H 10.0.0.44 -p 9678
The example loads the server listening on 10.0.0.44, port 9678 using the default
~/.beinc_server.json as a configuration file and usually gives you the Twisted
log console

beinc_poller.py:
$ ./beinc_poller.py -h
The example lists all available command options
$ ./beinc_poller.py -n weechat -t 10 -f 7 --cert-file /home/sgs/weechat_cert.crt \
  -p /home/sgs/.weechat_beinc_passwd https://10.0.0.44:9678
Starts polling from the instance (target) defined above,
defining an OSD timeout of 10 seconds, polling frequency of 7 seconds,
checking whether the server's SSL certificate was signed (issued) by /home/sgs/weechat_cert.crt,
extracting the target's password from /home/sgs/.weechat_beinc_passwd

beinc_generic_client.py:
$ ./beinc_generic_client.py -h
The example lists all available command options

beinc_weechat.py:
Create a configuration file based on beinc_config_sample.json, defining your targets
and copy it (or symlink it) to ~/<weechat-dir>/beinc_weechat.json
(weechat-dir is usually ~/.weechat)
Copy (or symlink) beinc_weechat.py to ~/<weechat-dir>/python/autoload/
Load the script in Weechat by typing: /python load beinc_weechat.py
Make sure that all your targets look as they should: /beinc target list
Test if your targets are displaying / relaying your messages: /beinc broadcast Test