annotate INSTALL @ 512:750db9ff8525

server side: launching script improvments: - no more difference between installed version and source version: libervia is a deamon by defaut, "fg" must be used to launch it foreground - fixed bad constants module imported in python part of libervia.sh - fixed stdout encoding in python part of libervia.sh - APP_NAME and APP_NAME_FILE use the constants module values - DATA_DIR variable moved to PLUGIN_OPTIONS - (constants) ASCII_APP_NAME renamed to APP_NAME_FILE to be consistent with SàT backend.
author Goffi <goffi@goffi.org>
date Sun, 24 Aug 2014 18:43:45 +0200
parents 0924710b666a
children 47c21905e002
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
420
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
1 Libervia's installation is currently a bit tricky. Full installation and
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
2 configuration instructions are given on the Salut à Toi wiki:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
3
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
4 http://wiki.goffi.org/w/index.php?title=Libervia/en
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
5
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
6
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
7 == Prerequesites ==
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
8
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
9 These steps are detailed on the Salut à Toi wiki:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
10
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
11 * install and configure Salut à Toi
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
12 * install and configure a local XMPP server (we recommend using Prosody)
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
13 * install sat_pubsub
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
14
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
15 == Dependencies ==
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
16
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
17 * you need to install the txJSON-RPC dependency. The installation script of the current
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
18 stable release is buggy, and it's fixed on the Bazaar repository, so you need to install
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
19 Bazaar or git and clone the repository:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
20
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
21 bzr branch lp:txjsonrpc
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
22
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
23 or
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
24
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
25 git clone git://github.com/oubiwann/txjsonrpc
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
26
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
27 Then you can install it:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
28
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
29 cd txjsonrpc
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
30 python setup.py install '''(as root, "sudo python setup.py install" for *buntu)'''
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
31
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
32 * install python2-gobject2 from your distribution repositories
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
33 * install the git version of pyjamas (http://pyj.be):
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
34
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
35 git clone git://pyjs.org/git/pyjamas.git
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
36 cd pyjamas
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
37 python boostrap.py
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
38
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
39 You can need to force a python version if libervia's compilation doesn't work, for example:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
40
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
41 python2.6 boostrap.py
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
42
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
43 Salut à Toi and Libervia are being developped with Python 2.7.3.
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
44 You can check that it works by compiling the helloworld example:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
45
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
46 cd examples/helloworld
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
47 ./build.sh
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
48
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
49 If you have no error message, it should be allright.
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
50
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
51 == Install Libervia ==
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
52
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
53 * to install Libervia using setuptools, the pyjsbuild executable should be accessible
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
54 from your environment variable "PATH". The easiest would be:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
55
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
56 cd pyjamas
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
57 sudo ln -sf bin/pyjsbuild /usr/bin/pyjsbuild
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
58
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
59 * clone libervia repository:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
60
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
61 hg clone http://repos.goffi.org/libervia
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
62
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
63 * install Libervia:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
64
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
65 cd libervia
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
66 python setup.py install
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
67
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
68 * create an account "libervia@yourserver.tld" (replace "yourserver.tld" by "example.net"
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
69 or something else) on your XMPP server, create a profile on SàT named "libervia", and
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
70 plug the SàT profile to this account.
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
71
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
72 == Configuration ==
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
73
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
74 You can configure the Libervia service from the SàT configuration file, for example:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
75
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
76 [libervia]
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
77 connection_type=both
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
78 port=8080
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
79 port_https=8443
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
80 ssl_certificate=libervia.pem
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
81 redirect_to_https=1
496
0924710b666a browser_side: remove the annoying (esp. when editing a message) scrolling each time you select a microblog entry
souliane <souliane@mailoo.org>
parents: 420
diff changeset
82 security_warning=1
420
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
83
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
84 Check the wiki for more information: http://wiki.goffi.org/wiki/Configuration/en
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
85
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
86 == Usage ==
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
87
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
88 The four components must be launched in the following order:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
89
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
90 * prosody
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
91 * sat_pubsub (with the xmpp domain and password as declared in prosodi.cfg.lua)
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
92 * sat
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
93 * libervia's web server
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
94
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
95 Your command input would look like that:
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
96
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
97 cd prosody && prosodyctl start
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
98 twistd sat_pubsub --jid=sat-pubsub.<xmpp_domain> --secret=<password>
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
99 sat
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
100 libervia
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
101
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
102 You can now drop your web browser on http://localhost:8080/libervia.html
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
103
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
104 If you encounter any issue, you can ask for help on MUC room sat@chat.jabberfr.org
ac0018e4391b misc: INSTALL: convert line delimiters to UNIX
souliane <souliane@mailoo.org>
parents: 419
diff changeset
105 or use the dev mailing list: http://lists.goffi.org