Skip to content

Instantly share code, notes, and snippets.

@tedhagos
Created January 2, 2012 03:07
Show Gist options
  • Save tedhagos/1549129 to your computer and use it in GitHub Desktop.
Save tedhagos/1549129 to your computer and use it in GitHub Desktop.
Installation notes for GNU Health
1. Make sure you have the following requisites
- Debian or Ubuntu
- Postgresql
- Python
- Tryton
2. Install requisite software
2.1 apt-get install python-pip python-lxml python-relatorio python-psycopg2 posgresql python-tz
3. Create the operating system user
# adduser gnuhealth
4. Create the database user
# su - postgres
$ createuser gnuhealth
Shall the new role be a superuser (y/n)
If gnuhealth is the only user in the system answer yes (I won't, i want to try the other way)
6. Pull up GNU health from PyPi (while logged in as gnuhealth)
gnuhealth@what$ pip install --user trytond_health_profile
7. Install the tryton client (this did not work for me), I actually had to do apt-get install tryton-client
gnuhealth$ pop install --user tryton
This actually installs the tryton client and server inside ~/.local/bin | The configuration file is at ~/.config
8. The server will listen only on localhost, if you want the server to accept connections from remote machines, you need to provide a trytond.conf. Now, that was not done by automatically by the installed, there is no file to edit. You need to create it, and then launch trytond with the -c (config) flag specifying the trytond.conf file
Create the trytond.conf, anywhere you want it, but I would put it at the same folder where the trytond executable is located.
See the contents of the file trytond.conf, I commented it some more for my own use.
9. Launch the trytond server
gnuhealth$ ~./local/bin/trytond -c trytond.conf
10. Launch the client, anywhere you want it. The client executable is tryton
#This file is part of Tryton. I pulled it out from http://hg.tryton.org/trytond/file/tip/etc/trytond.conf
# The most important things to set here are
# home --- set this to the IP address of the machine
# jsonrpc -- set the value to <ip address>:8000
2 #this repository contains the full copyright notices and license terms.
3 [options]
4
5 # This is the hostname used when generating tryton URI
6 #hostname =
7
8 # Activate the json-rpc protocol
9 jsonrpc = localhost:8000
10 #ssl_jsonrpc = False
11
12 # Configure the path of json-rpc data
13 #jsondata_path = /var/www/localhost/tryton
14
15 # Activate the xml-rpc protocol
16 #xmlrpc = *:8069
17 #ssl_xmlrpc = False
18
19 # Activate the webdav protocol
20 #webdav = *:8080
21 #ssl_webdav = False
22
23 # Configure the database type
24 # allowed values are postgresql, sqlite, mysql
25 #db_type = postgresql
26
27 # Configure the database connection
28 ## Note: Only databases owned by db_user will be displayed in the connection dialog
29 ## of the Tryton client. db_user must have create permission for new databases
30 ## to be able to use automatic database creation with the Tryton client.
31 #db_host = False
32 #db_port = False
33 #db_user = False
34 #db_password = False
35 #db_minconn = 1
36 #db_maxconn = 64
37
38 # Configure the postgresql path for the executable
39 #pg_path = None
40
41 # Configure the Tryton server password
42 #admin_passwd = admin
43
44 # Configure the path of the files for the pid and the logs
45 #pidfile = False
46 #logfile = False
47
48 #privatekey = server.pem
49 #certificate = server.pem
50
51 # Configure the SMTP connection
52 #smtp_server = localhost
53 #smtp_port = 25
54 #smtp_ssl = False
55 #smtp_tls = False
56 #smtp_password = False
57 #smtp_user = False
58
59 # Configure the path to store attachments and sqlite database
60 #data_path = /var/lib/trytond
61
62 # Allow to run more than one instance of trytond
63 #multi_server = False
64
65 # Configure the session timeout (inactivity of the client in sec)
66 #session_timeout = 600
67
68 # Enable psyco module
69 # Need to have psyco installed http://psyco.sourceforge.net/
70 #psyco = False
71
72 # Enable auto-reload of modules if changed
73 #auto_reload = True
74
75 # Prevent database listing
76 #prevent_dblist = False
77
78 # Enable cron
79 # cron = True
80
81 # unoconv connection
82 #unoconv = pipe,name=trytond;urp;StarOffice.ComponentContext
83
84 # Number of retries on database operational error
85 # retry = 5
@papinio
Copy link

papinio commented Aug 28, 2014

to say that this is great would be an under statement .. i know how to work my way through python scripting .. but this gnu health stuff is driving me crazy!! .could you be more detailed on the installation, like what is the relation of tryton and gnu health? i have looked almost everywhere about that relation and the more i look the more i get confused

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment